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
But this suggestion is invalid. When the __name__ is __main__ you cannot do a relative import... and it seems that this is how Kodi runs the addon. https://stackoverflow.com/a/66895066/11214013
The relative imports work if you import the file into an existing python instance, but not when you run python ./service.py.
Is there anyway to skip the refactoring? It also causes a second problem if my dependencies are installed to the addon directory (./resources/lib)... there will thousands of warnings. Excluding specific directories would be beneficial.
The text was updated successfully, but these errors were encountered:
This tool suggests refactoring my code as shown here.
INFO: ./service.themerr/service.py
But this suggestion is invalid. When the
__name__
is__main__
you cannot do a relative import... and it seems that this is how Kodi runs the addon. https://stackoverflow.com/a/66895066/11214013The relative imports work if you import the file into an existing python instance, but not when you run
python ./service.py
.Is there anyway to skip the refactoring? It also causes a second problem if my dependencies are installed to the addon directory (
./resources/lib
)... there will thousands of warnings. Excluding specific directories would be beneficial.The text was updated successfully, but these errors were encountered: