verbal-autopsy-software / DHIS2_VA_program

DHIS2 VA program metadata repository
GNU General Public License v3.0
4 stars 4 forks source link

Type Error in dummy VA events #49

Open user-official opened 5 years ago

user-official commented 5 years ago

I came up with this issue while running the script for creating 500 dummy events in VA program stored in DHIS2:

Posted BLOB for VA ID 256249e2-1cad-45ab-bd3c-a3884699b6eb - returned fileResource ID: N1hsEE5RwPB Traceback (most recent call last): File "post_demo_events.py", line 299, in e = VerbalAutopsyEvent(va_id, va_program_uid, args.orgunit, icd10_options, algorithm_metadata_options, file_id) File "post_demo_events.py", line 118, in init {"dataElement": "F4XGdOBvWww", "value": self.choose_icd10(icd10)}, File "post_demo_events.py", line 205, in choose_icd10 choices = dict(unweighted.items() + weighted.items()) TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items'

gocastro commented 5 years ago

you might be using Python 3, while the script has been developed in Python 2. See here: https://stackoverflow.com/questions/13361510/typeerror-unsupported-operand-types-for-dict-items-and-dict-items

user-official commented 5 years ago

Yep...I am using python 3....will check in python 2 once. Thanks !