You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'Segment' object has no attribute 'imagesequences' (neo 0.8.0) #779
I have a problem while filtering a block with neo 0.8.0. Previously, with neo 0.7.2, I don't have such a problem. The data is resting state if it makes any sense for you.
File "/home/ulianych/PycharmProjects/elephant/examples/granger_example.py", line 207, in granger_example_resting_state
analog_signals = block.filter(objects="AnalogSignal")
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 426, in filter
children.extend(self.data_children_recur)
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/block.py", line 115, in data_children_recur
return tuple(unique_objs(super(Block, self).data_children_recur))
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 350, in data_children_recur
self.container_children]
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 349, in <listcomp>
childs = [list(child.data_children_recur) for child in
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 351, in data_children_recur
return self.data_children + tuple(sum(childs, []))
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 321, in data_children
self._data_child_containers]
File "/home/ulianych/anaconda3/envs/elephant/lib/python3.7/site-packages/neo/core/container.py", line 320, in <listcomp>
childs = [list(getattr(self, attr)) for attr in
AttributeError: 'Segment' object has no attribute 'imagesequences'
The reason why I used PickleIO is because NixIO threw exceptions when I tried to save it. Don't remember which exceptions they were and I've not checked if NixIO is improved since then.
We could in principle handle this, but PickleIO is not expected to work across different versions, and I don't think we should encourage its use.
The docstring for PickleIO says:
"Note that files in this format may not be readable if using a different version
of Neo to that used to create the file. It should therefore not be used for
long-term storage, but rather for intermediate results in a pipeline."
Having said that, if you have a lot of 0.7.2 files in this format @dizcza we could provide a temporary solution to migrate them to 0.8.0. Please let us know.
I would like to see a version control check while loading a file in neo using a file format that is not cross-version compatible.
If the current version of neo does not match with the neo version of the file I'm loading, show a warning.
In particular for PickleIO.
Activity
samuelgarcia commentedon Dec 11, 2019
Andrew ? any idea ?
JuliaSprenger commentedon Dec 11, 2019
@dizcza Did you generate the file with Neo version 0.7.2 or 0.8.x?
dizcza commentedon Dec 11, 2019
The file was generated with neo 0.7.2
dizcza commentedon Dec 13, 2019
The reason why I used PickleIO is because NixIO threw exceptions when I tried to save it. Don't remember which exceptions they were and I've not checked if NixIO is improved since then.
apdavison commentedon Sep 13, 2020
We could in principle handle this, but PickleIO is not expected to work across different versions, and I don't think we should encourage its use.
The docstring for PickleIO says:
"Note that files in this format may not be readable if using a different version
of Neo to that used to create the file. It should therefore not be used for
long-term storage, but rather for intermediate results in a pipeline."
Having said that, if you have a lot of 0.7.2 files in this format @dizcza we could provide a temporary solution to migrate them to 0.8.0. Please let us know.
dizcza commentedon Sep 13, 2020
I would like to see a version control check while loading a file in neo using a file format that is not cross-version compatible.
If the current version of neo does not match with the neo version of the file I'm loading, show a warning.
In particular for PickleIO.
apdavison commentedon Sep 13, 2020
That's a good idea. I've created a ticket: #856