You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
I've searched for any related issues and avoided creating a duplicate issue.
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.
If I change /opt/rtmbot/plugins to /opt/rtmbot/more-plugins, for example, I can get the plugin to load.
Reproducible in:
This is reproducible in the sample project.
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:
Traceback (most recent call last):
File "/opt/rtmbot/venv/bin/rtmbot", line 11, in <module>
sys.exit(main())
File "/opt/rtmbot/venv/lib/python3.6/site-packages/rtmbot/bin/run_rtmbot.py", line 31, in main
bot.start()
File "/opt/rtmbot/venv/lib/python3.6/site-packages/rtmbot/core.py", line 100, in start
self._start()
File "/opt/rtmbot/venv/lib/python3.6/site-packages/rtmbot/core.py", line 75, in _start
self.load_plugins()
File "/opt/rtmbot/venv/lib/python3.6/site-packages/rtmbot/core.py", line 160, in load_plugins
cls = import_string(plugin_path)
File "/opt/rtmbot/venv/lib/python3.6/site-packages/rtmbot/utils/module_loading.py", line 17, in import_string
module = import_module(module_path)
File "/opt/rtmbot/venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'plugins.cve'
The text was updated successfully, but these errors were encountered:
It seems that rtmbot doesnt detect changes made to the plugin files.
I created a plugin for testing, then when I started modifying it, it stick with the first version it read. then when I changed the code and plugin name, it started complaining about importing module.
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.
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: