-
Notifications
You must be signed in to change notification settings - Fork 142
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
PluginBase causes ImportError in PyYAML #5
Comments
also causes ImportError in bsddb
Importing bsddb first works fine:
|
Yeah, won't work with PyYAML. :( |
I am encountering the same issue and it seems to be related to relative imports in the "offending" packages while the importer assumes absolute imports. I've been able to fix the issue by changing the last few relative imports in the "offending" package. I'll look at the pluginbase source code in the next few days and hopefully create a pull request. |
any updates on this? there are a number of libraries in the stdlib that are affected by this as well, including |
I am sorry but I've switched to stevedore as it seems to be in active development and integrates nicely into setuptools. |
@mittagessen Thanks! |
Same issue here with Scapy. |
All same issues. See also #10 Is this module in active development? |
It does not seem too. I re-implemented my own Plugin system to be honest. |
I am also experiencing this issue. |
In case you're interested, I create a small repo to show how I handled a minimalistic Plugin architecture - https://github.com/PaulSec/Python-plugins |
I was able to fix the issue by changing |
I fixed this in commit 9e5764f by setting the level parameter to the default value for the version of Python which is running. This appears to have been an issue with level always defaulting to 0 in Python 2 which prevents relative imports from working. See the documentation of import for more details. |
PluginBase seems to break PyYAML, causing ImportErrors on import.
I'm using the latest version of PyYAML (3.11) and PluginBase.
Tested on OS X and Linux.
Importing PluginBase first causes errors:
Importing YAML first works fine:
The text was updated successfully, but these errors were encountered: