r/learnpython • u/TreacleFlaky2283 • 4h ago
How to make this python script faster and able to run?
hey there, i m working on this python script: https://pastebin.com/kknURJij
and the main issue i m facing right now is its not running and i have been stuck in the terminal since so long...
i just want to ask how to make it faster so we can execute it.
Output when i run this script :
```DeprecationWarning: `langchain-community` is being sunset and is no longer actively maintained. See https://github.com/langchain-ai/langchain-community/issues/674 for details and migration guidance toward standalone integration packages.
from langchain_community.utilities import SQLDatabase.```
currently its stuck with this same terminal output.
My pc specs : Mac Air M1, Golden Gate 28
what i have tried :
Tried running on github codespaces but still not running but stuck with the same output.
2
u/CelebrityChess 1h ago
that deprecation warning is harmless, it's not what's freezing things. when a script goes quiet right after the imports it's usually sitting on a slow call, like connecting to the database or waiting on an api request that has no timeout. hit ctrl+c while it's hung and read the traceback, the last few lines show exactly which line it was stuck on. or put a print before each step so you can see where it stops.
2
u/LayotFctor 2h ago
So is it not running, or is it just slow? What was the last thing you wrote before it stopped? That's probably the issue, did you try removing it?