Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error in dummy VA events #49

Open
user-official opened this issue Mar 11, 2019 · 2 comments
Open

Type Error in dummy VA events #49

user-official opened this issue Mar 11, 2019 · 2 comments

Comments

@user-official
Copy link

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
Copy link
Contributor

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants