Nudin / LexData

Python bot framework for Lexemes on Wikidata
https://nudin.github.io/LexData/
MIT License
18 stars 5 forks source link

Can't create lexemes in unsupported languages #4

Closed blinry closed 4 years ago

blinry commented 4 years ago

I want to enter lexemes in a language that doesn't have an ISO code yet, like L1. LexData crashes if I try that. I wonder if there would be a workaround?

Program:

import LexData
tok = LexData.Language("mis-x-Q36846", "Q36846")
repo = LexData.WikidataSession("Blinry", "foobar")
l = LexData.get_or_create_lexeme(repo, "ike", tok, "Q34698")

Error:

Traceback (most recent call last):
  File "mod.py", line 17, in <module>
    l = LexData.get_or_create_lexeme(repo, "ike", tok, "Q34698")
  File "/usr/lib/python3.7/site-packages/LexData/__init__.py", line 519, in get_or_create_lexeme
    for item in DATA["search"]:
KeyError: 'search'
Nudin commented 4 years ago

Is fixed now

Nudin commented 4 years ago

@blinry There is another bug connected to languages without ISO code. So better wait for that to be fixed too!

Nudin commented 4 years ago

Should be now also fixed (quicker then expected)…