Open Podbrushkin opened 1 year ago
Related to the problem mentioned at https://phabricator.wikimedia.org/T291202.
The pywikibot
in this project is out of date and some API modules in MediaWiki were dropped.
If you change the code below in _apisite.py
of the pywikibot
the code will work.
types_wiki_old = self._paraminfo.parameter('query+info', 'token')['type']
to
if mw_ver < '1.36':
types_wiki_old = self._paraminfo.parameter('query+info', 'token')['type']
else:
types_wiki_old = []
It is odd because the exception only occurs since the second import using import_one.py
. There is no exception for the first import in a fresh install of the wikibase docker wmde.9
.
Hello, I can't run your application -
python import_one.py Q2
fails withTypeError: 'NoneType' object is not subscriptable
error. I have no expirience with Python or venv, how to launch virtual environment I've found here and here is what I've did:It brings this output:
At first I've tried to run
python import_one.py Q2
without setting up virtual environment, and it resulted with the same error. Also I'm not quite understand what values should haveentityUri
andpropertyUri
variables inapplication.config.ini
file. MyWIKIBASE_HOST
var in.env
file has a192.168.1.3
value and is accessible in browser vialocalhost
and192.168.1.3
, but192.168.1.3/entity
brings 404 error. Items are available throughhttp://localhost/wiki/Item:Q1
orhttp://192.168.1.3/wiki/Special:EntityPage/Q1
. Is there a way to consistently determine what values should be used forentityUri
andpropertyUri
variables?