Thanks for clarification. :)
toggle quoted messageShow quoted text
2020-05-17 19:10 GMT+02:00, Javi Domínguez <fjavids@...>:
I think that's the key. The first argument, the class name, must be the
same as the variable to which it is assigned the return of
ThisClassName = collections.namedtuple("ThisClassName", ...
Great, so it seems to work.
El 17/05/2020 a las 18:45, Noelia Ruiz escribió:
I am not sure but I'm curious too. Mesar started using namedtuple in
Emoticons add-on, coauthored by him (main author Chris).
Maybe a syntax error?
I don't have your repo, but maybe fixed using
NavKeys = collections.namedtuple('NavKeys', 'nextOption previousOption
2020-05-17 17:32 GMT+02:00, Javi Domínguez <fjavids@...>:
Does anyone know why this error occurs? Nothing happens, I easily fix it
by converting it to normal list before saving but i would like to
understand the cause of the failure.
NavKeys = collections.namedtuple("NavigationKeys", ("nextOption",Thanks
"previousOption", "nextItem", "previousItem"))
self.navKeys = NavKeys("kb:rightArrow", "kb:leftArrow",
ERROR - unhandled exception (17:10:15.027) - MainThread (10756):
Traceback (most recent call last):
File "gui\settingsDialogs.pyc", line 623, in onOk
File "gui\settingsDialogs.pyc", line 617, in _doSave
line 216, in onSave
line 86, in save
pickle.dump((ring, self.defaultActive, self.navKeys), f, 0)
_pickle.PicklingError: Can't pickle <class
'globalPlugins.easyNavigation.NavigationKeys'>: attribute lookup
NavigationKeys on globalPlugins.easyNavigation failed