I have some trouble with loading a pickled file in a module that is different from the module where I pickled the file. I am aware of the following thread: Unable to load files
I had a similar problem and only just realized the differences between our implementations.
Your file structure:
My mistake (using your file names) was first:
What solved my pickle import problem:
This had the welcomed side effect that I didn't need to import the util_and_class file as it's baked into the pickle file. Calling the instance and saving the pickle in a separate file resolved the __name__
issue of "loading a pickled file in a module that is different from the module where I pickled the file."