Xqt added a comment.
I guess there is sth wrong with the type. This should be str for py3 or
either str or Unicode for py2 but should be never basestring.
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
Lokal_Profil added a comment.
Thanks @Ricordisamoa. Hadn't noticed that basestring got defined differently
depending on python version
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To:
gerritbot added a comment.
Change 276146 merged by jenkins-bot:
Support querying for commonsMedia via WDQ
https://gerrit.wikimedia.org/r/276146
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
Lokal_Profil added a comment.
There is something subtle going on here:
>>> Claim.types.get(claim.type)
>>> basestring
>>> isinstance(Claim.types.get(claim.type), basestring)
False
How about I just admit defeat and go for the tuple solution instead.
TASK
gerritbot added a comment.
Change 276146 had a related patch set uploaded (by Lokal Profil):
Support querying for commonsMedia via WDQ
https://gerrit.wikimedia.org/r/276146
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
Xqt added a comment.
maybe the equality test. Perhaps the type is str or unicode.
Try isinstance(Claim.types.get(claim.type), basestring)
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To:
gerritbot added a comment.
Change 276131 merged by jenkins-bot:
Allow any claim of basestring type to create a STRING query
https://gerrit.wikimedia.org/r/276131
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
Xqt added a comment.
Claim.__dict__ is
{'_type': u'external-id', 'snak': None, 'hash': None, 'target': None,
'rank': u'normal', 'qualifiers': OrderedDict(), 'repo': DataSite("wikidata",
"wikidata"), 'sources': [], 'snaktype': u'value', 'on_item': None,
'isReference': False, 'id':
gerritbot added a comment.
Change 276131 had a related patch set uploaded (by Lokal Profil):
Allow any claim of basestring type to create a STRING query
https://gerrit.wikimedia.org/r/276131
TASK DETAIL
https://phabricator.wikimedia.org/T128987
EMAIL PREFERENCES
Lokal_Profil added a comment.
This is likely a result of `P268` being changed from string to external-id.
Changing to `P225` fixes the error.
However the fact that it is failing indicative of a problem with
`wikidataquery.fromClaim()` being too picky in what it allows as STRING claims.
10 matches
Mail list logo