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
The Array.py source code imports the recordclass module. When I used pip3 install recordclass
to install the Python 3 version, I got recordclass-0.12.0.1
When I run the visualization, however, I get this traceback:
Traceback (most recent call last):
File "Array.py", line 25, in <module>
class Array(object):
File "Array.py", line 27, in Array
Element.__new__.__defaults__ = (None,) * len(Element._fields)
AttributeError: type object 'Element' has no attribute '_fields'
This code is trying to set the default values for the record fields when a new class instance is built. The Python 3 version uses a different name for the "fields" attribute. Rewriting the line as:
The Array.py source code imports the
recordclass
module. When I usedpip3 install recordclass
to install the Python 3 version, I got recordclass-0.12.0.1
When I run the visualization, however, I get this traceback:
This code is trying to set the default values for the record fields when a new class instance is built. The Python 3 version uses a different name for the "fields" attribute. Rewriting the line as:
works. I'm not sure if that's backwards compatible with Python 2.*.
The text was updated successfully, but these errors were encountered: