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
Thank you for the great software, I am very excited to be using it for my PhD project!
I have noticed an issue in the latest release (v0.5.0) when trying to generate a mesh object, which I believe is due to the change in how Python 3 handles the zip() function and division / operator.
The first problem I ran into was in Line 1429 of the SegmentPlugin.py script:
contours=zip(*segobj.enumContours())[0]
Here I received the following error:
TypeError: 'zip' object is not subscriptable
After reading up about it, it turns out that in Python 2, the zip() function returns a list, while Python 3 returns an iterable object, as described in this thread.
After implementing the solutions described here, the next error occurred in Line 460:
returning the error:
TypeError: list indices must be integers or slices, not float
Again, there has been a change in how Python 3 handles the / operator as discussed here.
I changed the single, true division operator / which returns a float, to a floor division // ,which returns an integer.
After doing this, I was able to generate the mesh object from the segmentation contours.
EDIT: I see now that you have implemented this as well in the experimental branch, but thought logging this would be useful for anyone trying to use this feature.
Cheers and all the best!
Marcell
The text was updated successfully, but these errors were encountered:
Hi @marcellillyes, thanks for flagging these issues. I haven't had time to do much with Eidolon in a long while as you see but with the experimental version a lot of these old Python2 issues will be cleaned out.
Hi Eric,
Thank you for the great software, I am very excited to be using it for my PhD project!
I have noticed an issue in the latest release (v0.5.0) when trying to generate a mesh object, which I believe is due to the change in how Python 3 handles the
zip()
function and division/
operator.The first problem I ran into was in Line 1429 of the SegmentPlugin.py script:
Here I received the following error:
TypeError: 'zip' object is not subscriptable
After reading up about it, it turns out that in Python 2, the
zip()
function returns a list, while Python 3 returns an iterable object, as described in this thread.After implementing the solutions described here, the next error occurred in Line 460:
returning the error:
TypeError: list indices must be integers or slices, not float
Again, there has been a change in how Python 3 handles the
/
operator as discussed here.I changed the single, true division operator
/
which returns a float, to a floor division//
,which returns an integer.After doing this, I was able to generate the mesh object from the segmentation contours.
EDIT: I see now that you have implemented this as well in the experimental branch, but thought logging this would be useful for anyone trying to use this feature.
Cheers and all the best!
Marcell
The text was updated successfully, but these errors were encountered: