Open dancehours opened 5 years ago
This error seems to indicate that when you saved the snapshot last time, some code of yours previously defined an attribute named maximum
, but that attribute is no longer defined in your code so that pickle is failing when it tries to restore that attribute. If maximum
isn't important, you can probably put in a dummy declaration for it so that the pickle loading no longer fails, but there may be other changes needed.
Actually I didnt define maximum in my code.I am not sure where it comes from.
Hi, I would need to make a diagram of the gcal model. I found I can referred to the model view showed in the second image from this link http://ioam.github.io/topographica/Tutorials/gcal.html. I have a difficulty on making the off LGN's dark center bright boundary 's effect. I would like to ask, which software do you use to make that image ? Sorry for this details and technique question.
This is the right link. https://ioam.github.io/topographica/Tutorials/gcal.html
That's a screenshot from the Tk gui's model editor.
This error seems to indicate that when you saved the snapshot last time, some code of yours previously defined an attribute named
maximum
, but that attribute is no longer defined in your code so that pickle is failing when it tries to restore that attribute. Ifmaximum
isn't important, you can probably put in a dummy declaration for it so that the pickle loading no longer fails, but there may be other changes needed.
Hi Bednar, I am not sure how to define a dummy declaration in the definition of load_snapshot properly, could you show me this ?
Hi Bednar, I am sorry I ask the very old question now. I am stuck with this problem in my project and really need to solve it soon. Could you please give me some suggestions ?
Sorry; it's very difficult to debug that without the running session and all your files. A message like that usually indicates that the python code you are running does not match the code that you had when you saved the pickle. At the time of the pickle, there was a module with an object 'maximum' defined, but now there isn't such an object declared in that module, so when pickle tries to restore its state, it fails. From the message I can't tell what module that might be, but if you can figure out which one it is, load the __init__.py
file from it into an editor, and add a dummy declaration like class maximum(object): pass
. Then maybe loading that pickle will succeed. I can't theorize why maximum
would have disappeared from your source tree; maybe it's simply that you're using a different Topographica version or some other different files of your own. Sorry I can't be more help than that; Pickle files very often don't give useful error messages!
Hi, I get a error from running topographica jobs,
Traceback (most recent call last): File "/scratch01/env_c/topographica_pbc/pbc_measurement.py", line 90, in
load_snapshot(path+fname+'/'+snapshot_name)
File "/scratch01/env_c/topographica_pbc/topo/command/init.py", line 325, in load_snapshot
pickle.load(snapshot)
AttributeError: 'module' object has no attribute 'maximum'
Before it worked well, suddenly this error appears, I have no idea how to solve it.