moved Class location and now can't pickle-load object of that class

Viewed 61

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

0 Answers
Related