clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

mportError: cannot import name 'permissions' from partially initialized module 'core' (most likely due to a circular import) (/nzbToMedia/core/__init__.py) #1976

Closed spattersTatt closed 7 months ago

spattersTatt commented 1 year ago

Howdy All,

I have just upgraded a machine to Ubuntu 22 LTS and in the process of migrating stuff accross from the old machine. On there I had nzb2media running all fine with integrations into SAB and other items, but this new machine not quite there....

For the most part, everything was a lift and shift from a config perspective, and proggies were upgraded where required, including a fresh git pull of nzbtomedia, then copy in the previous config file. All appears to be fine, however when SAB or anything tries to call the scripts it throws this error:

Changing to directory: /nzbToMedia

-- Cleaning bytecode --
b'Removing __pycache__/\n'
b'Removing __pycache__/\n'

-- Cleaning folders: ['libs', 'core'] --
No folders to clean

Returning to directory:  /usr/bin

-- Cleanup finished --

Traceback (most recent call last):
File "/nzbToMedia/nzbToMedia.py", line 734, in <module>
import core
File "/nzbToMedia/core/__init__.py", line 52, in <module>
from core import logger, main_db, version_check, databases, transcoder
File "/nzbToMedia/core/main_db.py", line 20, in <module>
from core import permissions
ImportError: cannot import name 'permissions' from partially initialized module 'core' (most likely due to a circular import) (/nzbToMedia/core/__init__.py)

its using the system python 3

~$ which python3 /usr/bin/python3

$ /usr/bin/python3 -V Python 3.10.12

I am not much of a python guru, so just a little lost on where to start looking as to what is causing the issue? all file system permissions are correct for the two users which need to run the scripts, they were all from the previous platform as well using extended acl'son the filesystem.

Anyone able to suggest what to look at? missing python libraries, or something missing in env variables or something maybe?

clinton-hall commented 1 year ago

1971

Can you confirm that you have done a fresh/clean install (You say above git pull.... was this a fresh clone?) Another user experienced this, but then a fresh install worked.