Skip to content

Issue testing install #205

Description

@Superraptor

Hello! Trying to run the basic test script, i.e.:

from wikidataintegrator import wdi_core

my_first_wikidata_item = wdi_core.WDItemEngine(wd_item_id='Q5')

This results in the following traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\[USERNAME]\anaconda3\envs\wbsync_test\Lib\site-packages\wikidataintegrator\wdi_core.py", line 461, in __init__
    self.init_data_load()
  File "C:\Users\[USERNAME]\anaconda3\envs\wbsync_test\Lib\site-packages\wikidataintegrator\wdi_core.py", line 505, in init_data_load
    self.wd_json_representation = self.get_wd_entity()
                                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[USERNAME]\anaconda3\envs\wbsync_test\Lib\site-packages\wikidataintegrator\wdi_core.py", line 600, in get_wd_entity
    return self.parse_wd_json(wd_json=json_data['entities'][self.wd_item_id])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\[USERNAME]\anaconda3\envs\wbsync_test\Lib\site-packages\wikidataintegrator\wdi_core.py", line 620, in parse_wd_json
    data_type = [x for x in WDBaseDataType.__subclasses__() if x.DTYPE == z['mainsnak']['datatype']][0]
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

I'm brand new so not exactly sure how to debug; any help appreciated!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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