-
Notifications
You must be signed in to change notification settings - Fork 255
Problems with importing plugins #94
Comments
The sys.paths look good to me, I'm not sure why it works differently. /opt/rtmbot/venv/lib/python3.6/site-packages/plugins/ is the one causing the problems in the virtualenv case. |
I had this problem too. I didn't have much time to investigate so, I just set the pip installation version back to 0.4.0 which worked for me. |
I have the same issue with 0.4.1. It seems that rtmbot doesnt detect changes made to the plugin files. |
Hey all, We're still looking into this but for the moment it appears the cfg file is referencing the wrong plugins folder as you mentioned. If you rename your customs plugin folder to something else and then use that in your config file, you should get past without the import errors that you've been seeing. |
renaming the plugin folder worked for me. thanks! |
Description
Something causes problems in importing plugins from the bot's directory. Since the pip install installs plugins/repeat.py in Python's library directory, it overrides the one in the bot's directory.
My custom plugins are in /opt/rtmbot/plugins. I set the BASE_PATH to /opt/rtmbot, but that didn't help.
I tried installing in a virtualenv and with the system Python. System Python seems to work better for some reason.
I added a debug print of sys.path before the module loading code.
This is from the system Python install:
And this is from the virtualenv:
If I change /opt/rtmbot/plugins to /opt/rtmbot/more-plugins, for example, I can get the plugin to load.
Reproducible in:
RTMBot version: 0.4.1
Python version: 3.6.6
OS Version: Ubuntu 18.04
Expected result:
No import errors.
Actual result:
Rtmbot fails to start due to not finding my plugins.
Attachments:
The actual error:
The text was updated successfully, but these errors were encountered: