1

in my project I had a submodule called pakreader from whick I was importing in this way:

from pakreader.pak import Pak

then I moved pak.py in the app/ folder so that now I have to import

from pakreader.app.pak import Pak

Unfortunately I had saved some object of class Pak in a pickle file and now when I try to unpickle them i get the following error:

ModuleNotFoundError: No module named 'pakreader.pak'

Is there a way to fix this? Many thanks Regards

EDIT: the init.py file is there, the problem is that the path these object were saved with (the old version module) has changed in the new version

Alberto B
  • 315
  • 1
  • 2
  • 10
  • Can you give some more detailed informations about your folder structure? Anyways I asume you are missing a `__init__.py` file, which creates a module you can work with. Otherwise files from subdirectories can't be imported. – Maik Hasler Oct 11 '21 at 07:36

0 Answers0