-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyrogram doesn't run when executing scripts outside the current directory #41
Comments
Hi, don't name your project folder |
@delivrance Well, I already use other name, just took it here as example |
@Onefivefournine Good, this is indeed some unwanted behaviour. Instead of |
@delivrance Unfortunatetly, I'm not so good at python, so take it as a wish 😄 |
@Onefivefournine Noted. There is actually #4 open for that, but I'm still unsure how to make it nicer (without messing too much with Client parameters). Regarding this issue, I'm labeling it as enhancement. |
As a temporary workaround for this you can use the api_key parameter instead: https://docs.pyrogram.ml/start/ProjectSetup#configuration |
For example I have some boilerplate code with client initiation in a folder named
MyFancyPythonModule
, also I haveconfig.ini
in that folder, so thatIf I run it from root (
./MyFancyPythonModule/app.py
) it fails to initiate because there are noconfig.ini
in root, but it tries to take it inclient.py
line 725I suppose it's better to use something like
os.path.join(os.path.dirname(__file__), 'config.ini')
, or even make it configurable(passing a file path to read configs)The text was updated successfully, but these errors were encountered: