-
-
Notifications
You must be signed in to change notification settings - Fork 588
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
[Plugin] Unable to load using absolute path #726
Comments
@moham96 IIRC, relative imports are not allowed within plugins. I might have to double check on this, but can you try to make your imports absolute and give it a try. If necessary add your plugin module as |
You can also try:
Ref: https://github.com/abhinavsingh/proxy.py#unable-to-load-plugins |
using |
Correct. In my tests it worked while documenting. But IIRC, I was using absolute imports in my external plugin. Probably, I we must update the README with relevant context. If you wish, please send out a PR. |
Can double confirm, absolute path currently doesn't work as advertised. I think code got broken at some point, because this used to work. Let's keep this open until fixed. Thank you again for reporting it. |
Describe the bug
This states that one can load a plugin simply by using the absolute path for the plugin but it's not working for me
To Reproduce
Steps to reproduce the behavior:
1- create a simple plugin in a directory outside
proxy.py
tree for me i created a directory at/home/mohammad/repos/plugintest/
that contains a file namedproxyPlugin.py
the file contains a plugin class namedproxyPlugin
2. Run
proxy.py
aspython -m proxy --log-level d --ca-key-file ca-key.pem --ca-cert-file ca-cert.pem --ca-signing-key-file ca-signing-key.pem --plugins /home/mohammad/repos/plugintest/proxyPlugin.proxyPlugin
3- The following exception is raised
TypeError: the 'package' argument is required to perform a relative import for '.home.mohammad.repos.plugintest.proxyPlugin'
Expected behavior
According to the
README.md
file using the absolute path for the plugin should work just fineVersion information
OS: Manjaro linux
Device: Desktop pc
proxy.py version: git version
The text was updated successfully, but these errors were encountered: