CaughtDependencyError: NotImplementedError: Failed to process <diff.added_claims>: monolingualtext datatype is not supported yet.
When processing https://www.wikidata.org/wiki/?diff=197333895
Seems to be a pretty common error.
CaughtDependencyError: NotImplementedError: Failed to process <diff.added_claims>: monolingualtext datatype is not supported yet.
When processing https://www.wikidata.org/wiki/?diff=197333895
Seems to be a pretty common error.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Temp fix for monolingualtext bug | pywikibot/wikibase | master | +7 -2 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Ladsgroup | T117254 Feature expansion WikiData reverted detector | |||
Resolved | None | T118565 monolingualtext datatype is not supported yet. |
Here's a call for this on the command line:
$ python Python 3.4.0 (default, Jun 19 2015, 14:20:21) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from revscoring.extractors import APIExtractor >>> import mwapi >>> extractor = APIExtractor(mwapi.Session(host="https://wikidata.org")) >>> from wb_vandalism.datasources.diff import added_claims >>> extractor.extract(197333895, added_claims) Traceback (most recent call last): File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/dependencies/functions.py", line 236, in _solve value = dependent(*args) File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/dependencies/dependent.py", line 37, in __call__ return self.process(*args, **kwargs) File "./wb_vandalism/datasources/diff.py", line 69, in process_added_claims for p_number in claims_differ.changed(): File "./wb_vandalism/datasources/util.py", line 28, in changed return set(o for o in self.intersect File "./wb_vandalism/datasources/util.py", line 29, in <genexpr> if self.past_dict[o] != self.current_dict[o]) File "/home/halfak/env/3.4/lib/python3.4/site-packages/pywikibase/claim.py", line 155, in __eq__ return other.toJSON() == self.toJSON() File "/home/halfak/env/3.4/lib/python3.4/site-packages/pywikibase/claim.py", line 176, in toJSON data['mainsnak']['datavalue'] = self._formatDataValue() File "/home/halfak/env/3.4/lib/python3.4/site-packages/pywikibase/claim.py", line 419, in _formatDataValue return {'value': self._formatValue(), File "/home/halfak/env/3.4/lib/python3.4/site-packages/pywikibase/claim.py", line 409, in _formatValue % self.type) NotImplementedError: monolingualtext datatype is not supported yet. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/extractors/api.py", line 122, in extract return self._extract(rev_id, dependents, context, cache) File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/extractors/api.py", line 179, in _extract return self.solve(dependents, context=context, cache=extract_cache) File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/dependencies/context.py", line 39, in solve return solve(dependents, context=context, cache=cache) File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/dependencies/functions.py", line 59, in solve value, cache, history = _solve(dependent, context=context, cache=cache) File "/home/halfak/env/3.4/lib/python3.4/site-packages/revscoring/dependencies/functions.py", line 242, in _solve raise CaughtDependencyError(message, e, tb) revscoring.errors.CaughtDependencyError: NotImplementedError: Failed to process <diff.added_claims>: monolingualtext datatype is not supported yet.
Change 253607 had a related patch set uploaded (by Ladsgroup):
Temp fix for monolingualtext bug