Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Cannot configure unkown_error logging #356
Comments
|
@jillro Thanks for the report, I assume you are keeping your session files elsewhere otherwise you'd get a similar error when running. About the issue, maybe we can just get rid of that portion of code altogether. The idea behind was to have people report unknown errors regardless of their logging settings. |
|
Indeed we are keeping session informations in database. Removing that portion of code would be enough I think. |
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/develop.zipand reproduced the issue using the latest development version.Description
When a RPC UnknownError is raised, Pyrogram tries to open and write in
unkown_errors.txtin the current directory. If Pyrogram has no write access to current directory, the program crash, and the only error logged is a permission denied error, without any information on the UnkownError.Pyrogram should not require write access to current directory and should use standard Python tools for logging. Pyrogram can configure a default logging handler for unkown rpc errors to current directory, but in any case it should use the standard python
loggingso users can configure another handler.Steps to Reproduce
I don't know how to reproduce an unkown RPC error, because I cannot read the log to understand mine.
Traceback