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
Traceback (most recent call last):
File "/Users/jasonzhang/Documents/xxxxxx.py", line 58, in <module>
namedtupled.map({'_key': 1})
File "/Users/jasonzhang/Documents/code/k2assets-data-generator/venv/lib/python3.7/site-packages/namedtupled/namedtupled.py", line 11, in mapper
return namedtuple_wrapper(_nt_name, **mapping)
File "/Users/jasonzhang/Documents/code/k2assets-data-generator/venv/lib/python3.7/site-packages/namedtupled/namedtupled.py", line 18, in namedtuple_wrapper
wrap = namedtuple(_nt_name, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/__init__.py", line 370, in namedtuple
raise ValueError('Field names cannot start with an underscore: '
ValueError: Field names cannot start with an underscore: '_key'
The text was updated successfully, but these errors were encountered:
Hmm. So the underlying data structure collections.namedtuple doesn't allow any field name starting with underscore. There is a keyword only parameter rename which is set to False by default. But, If set to True then that will rename the fields with the respective positional value.
version: 0.3.3
code:
result:
The text was updated successfully, but these errors were encountered: