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

Issue testing install #205

Open
Superraptor opened this issue Aug 14, 2024 · 3 comments
Open

Issue testing install #205

Superraptor opened this issue Aug 14, 2024 · 3 comments

Comments

@Superraptor
Copy link

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!

@Superraptor
Copy link
Author

Superraptor commented Aug 14, 2024

(If it helps I'm using version wikidataintegrator==0.9.30 and Python 3.11.9)

@DLu
Copy link

DLu commented Nov 22, 2024

I have replicated this, same version number

@LeMyst
Copy link
Contributor

LeMyst commented Nov 22, 2024

WikidataIntegrator doesn't support EntitySchema
Should not be an issue if you don't have an EntitySchema referenced in your entity.

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

3 participants