I wanted to use several thousand instances of my class in another context.
For now, I used a pickle
file for that, but ran into severe issues when I tried to load the pickle file in another context. By this, I mean that I have somewhat resembling the following the structure:
main.py
Extractors
pickler
Builder
pickle_loader
Yet, if I try to load the pickle files with pickle_loder, it always gives a similar error to this.
Is there another, maybe more suitable way how I can store and reload the instances? Since one execution of the Extractors takes around 2h, I do not want to execute them each time I experiment with the Builder.
I have also tried the solutions given, but I can't seem to get it to work with the explicit import statement.