Skip to content

AttributeError: 'unicode' object has no attribute ‘__dict__' #13

@alejandrodob

Description

@alejandrodob

Quoting some feedback provided by a user:

I have been using enki to extract the results from a pybossa project. It often throws me the following error message:

Traceback (most recent call last):
  File "pybossautils.py", line 464, in <module>
    pprint(calculate_expert_inter_rater_agreement())
  File "pybossautils.py", line 363, in calculate_expert_inter_rater_agreement
    combined_expert_dict = create_expert_agreement_pre_processing_dict()
  File "pybossautils.py", line 351, in create_expert_agreement_pre_processing_dict
    combined_dict = build_combined_dict_keyed_on_composite_key()
  File "pybossautils.py", line 232, in build_combined_dict_keyed_on_composite_key
    user_individual_dict_results = create_individual_dict(project_short_name="mvp-01")
  File "pybossautils.py", line 151, in create_individual_dict
    e = init_enki(project_short_name=project_short_name)
  File "pybossautils.py", line 27, in init_enki
    e.get_task_runs()
  File "/Users/mcquil02/anaconda/lib/python2.7/site-packages/enki/__init__.py", line 147, in get_task_runs
    for tr in self.task_runs[t.id]]
  File "/Users/mcquil02/anaconda/lib/python2.7/site-packages/enki/__init__.py", line 57, in explode_info
    tmp = item.__dict__['data']
AttributeError: 'unicode' object has no attribute ‘__dict__'

I’m trying to multiply two numbers together, it’s quite a simple calculation so I’m not sure why it would be crashing. I think it may be timing out but that’s not obvious from the error message. If I leave it for a while and re-run the code it works within a matter of seconds. Let me know if you need any further information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions