-
Notifications
You must be signed in to change notification settings - Fork 278
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
Fix unable to start Medusa due to configparser ImportError #5145
Conversation
Fix `configparser`s package structure. Add missing `.pth` file for configparser `.pth` file renamed for simplicity - original name: `configparser-3.5.0-py2.7-nspkg.pth`.
* Fix `_configure_syspath` to handle `.pth` files Fix `configparser`s package structure. Add missing `.pth` file for configparser `.pth` file renamed for simplicity - original name: `configparser-3.5.0-py2.7-nspkg.pth`. * Explain the code better * Update info on `ext/readme.md` * Prepare `syspath` code for the future * Update changelog
This doesn't seem to work if you have configparser installed with a system package:
After running This is on Debian testing. I ran Debian package info:
|
@hobeone |
Also I must say, |
Adding that init.py file doesn't seem to fix it. I get the same error code when starting. I think you're right about the package being too old. When I get a second I'll see about filing a request to update it. |
Fixes #5137
I had a hunch that the
.pth
file I got when installing the package locally was important.I can try to explain the fix better later, if anyone is interested, but basically
site.addsitedir
adds a path tosys.path
, plus it handles these files if any are found on the path.However it uses
appends
and notinsert
, that's why we need to rebuildsys.path
like in the new code.https://bugs.python.org/issue7744