[issue38717] csv DictWriter's internal _dict_to_list raise error unsupported operand

Patrick Schneeweiß report at bugs.python.org
Wed Nov 6 05:44:36 EST 2019


Patrick Schneeweiß <afflictorx at gmail.com> added the comment:

Hello all,

This is my dict:
{'rule': 'WAN-2-Web|unknown (Barracuda Networks CloudGen Firewall)', 'April (2018)': '', 'May (2018)': '', 'June (2018)': '', 'July (2018)': '', 'August (2018)': '', 'April (2019)': '', 'May (2019)': '14', 'June (2019)': '', 'July (2019)': '', 'August (2019)': ''}

And this was my fieldnames list:
['rule', 'April (2018)', 'May (2018)', 'June (2018)', 'July (2018)', 'August (2018)', 'April (2019)', 'May (2019)', 'June (2019)', 'July (2019)', 'August (2019)']


when I call the keys Method on this dict, I receive this:
dict_keys(['rule', 'April (2018)', 'May (2018)', 'June (2018)', 'July (2018)', 'August (2018)', 'April (2019)', 'May (2019)', 'June (2019)', 'July (2019)', 'August (2019)'])

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38717>
_______________________________________


More information about the Python-bugs-list mailing list