Unable to import external script to addon default.py within plugin.video.addon folder
#1
I am re-learning how to make Kodi addons. i have the following sample directory structure:


plugin.video.test_addon
    resources
        --> addon_utils.py
    addon.xml
    default.py
    globals.py

On the  default.py when ever i try either of the following commands, I get the assoicated error messages:
  1. from globals import * - ERROR: ImportError: No module named globals
  2. from resources.addon_utils import * - ERROR: ImportError: No module named resources.addon_utils 


As you can see, my question is how do I import scripts within the my plugin.video.addon directory, as currently it is causes the above ImportErrors?

Many Thanks.
Reply


Messages In This Thread
Unable to import external script to addon default.py within plugin.video.addon folder - by sshah93 - 2020-06-13, 22:48


Logout Mark Read Team Forum Stats Members Help
Unable to import external script to addon default.py within plugin.video.addon folder0
This forum uses Lukasz Tkacz MyBB addons.