Dalba created this task.
Dalba added projects: Pywikibot-core, Pywikibot-tests.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
$ export PYWIKIBOT2_TEST_WRITE_FAIL=1
$ python -m unittest tests.edit_failure_tests.TestWikibaseSaveTest
tests: max_retries reduced from 5 to 1
Logging in to wikidata:test as Dalba@tools
WARNING: API error modification-failed: "foo" is not a known language code.
EWARNING: API error invalid-snak: Invalid snak data.
EWARNING: API error wikibase-no-direct-editing: Direct editing is disabled in namespace
.WARNING: API error modification-failed: Malformed input: oo
EWARNING: API error modification-failed: An URL scheme "wtf" is not supported.
EWARNING: API error modification-failed: This URL misses a scheme like "https://": Not a URL at all
E
======================================================================
ERROR: test_WbMonolingualText_invalid_language (tests.edit_failure_tests.TestWikibaseSaveTest)
Attempt adding a monolingual text with an invalid language.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\pywikibot-core\pywikibot\page.py", line 118, in handle
    func(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 4444, in addClaim
    self.repo.addClaim(self, claim, bot=bot, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 1312, in callee
    return fn(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 7713, in addClaim
    data = req.submit()
  File "...\pywikibot-core\pywikibot\data\api.py", line 2195, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: modification-failed: "foo" is not a known language code. [messages:[{'name': 'wikibase-validator-not-a-
language', 'parameters': ['foo'], 'html': {'*': '"foo" is not a known language code.'}}]; help:See https://test.wikidata.org/w/api.p
hp for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki
-api-announce> for notice of API deprecations and breaking changes.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\pywikibot-core\tests\edit_failure_tests.py", line 151, in test_WbMonolingualText_invalid_lan
guage
    item.addClaim, claim)
  File "...\pywikibot-core\tests\aspects.py", line 317, in assertAPIError
    code, info, msg, self).handle(callable_obj, args, kwargs)
  File "...\pywikibot-core\tests\utils.py", line 297, in handle
    callable_obj(*args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 136, in wrapper
    handle(func, self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 128, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[wikidata:test:Q68]] failed:
modification-failed: "foo" is not a known language code. [messages:[{'name': 'wikibase-validator-not-a-language', 'parameters': ['fo
o'], 'html': {'*': '"foo" is not a known language code.'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe t
o the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice
of API deprecations and breaking changes.]

======================================================================
ERROR: test_WbMonolingualText_invalid_text (tests.edit_failure_tests.TestWikibaseSaveTest)
Attempt adding a monolingual text with an invalid non-string text.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\pywikibot-core\pywikibot\page.py", line 118, in handle
    func(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 4444, in addClaim
    self.repo.addClaim(self, claim, bot=bot, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 1312, in callee
    return fn(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 7713, in addClaim
    data = req.submit()
  File "...\pywikibot-core\pywikibot\data\api.py", line 2195, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: invalid-snak: Invalid snak data. [messages:[{'name': 'wikibase-api-invalid-snak', 'parameters': [], 'ht
ml': {'*': 'Invalid snak data.'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-annou
nce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and b
reaking changes.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\pywikibot-core\tests\edit_failure_tests.py", line 161, in test_WbMonolingualText_invalid_tex
t
    item.addClaim, claim)
  File "...\pywikibot-core\tests\aspects.py", line 317, in assertAPIError
    code, info, msg, self).handle(callable_obj, args, kwargs)
  File "...\pywikibot-core\tests\utils.py", line 297, in handle
    callable_obj(*args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 136, in wrapper
    handle(func, self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 128, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[wikidata:test:Q68]] failed:
invalid-snak: Invalid snak data. [messages:[{'name': 'wikibase-api-invalid-snak', 'parameters': [], 'html': {'*': 'Invalid snak data
.'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https
://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]

======================================================================
ERROR: test_math_invalid_function (tests.edit_failure_tests.TestWikibaseSaveTest)
Attempt adding invalid latex to a math claim.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\pywikibot-core\pywikibot\page.py", line 118, in handle
    func(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 4444, in addClaim
    self.repo.addClaim(self, claim, bot=bot, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 1312, in callee
    return fn(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 7713, in addClaim
    data = req.submit()
  File "...\pywikibot-core\pywikibot\data\api.py", line 2195, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: modification-failed: Malformed input: oo [messages:[{'name': 'wikibase-validator-malformed-value', 'pa
rameters': ['oo'], 'html': {'*': 'Malformed input: oo'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe t
o the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice
of API deprecations and breaking changes.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\pywikibot-core\tests\edit_failure_tests.py", line 169, in test_math_invalid_function
    self.assertAPIError('modification-failed', None, item.addClaim, claim)
  File "...\pywikibot-core\tests\aspects.py", line 317, in assertAPIError
    code, info, msg, self).handle(callable_obj, args, kwargs)
  File "...\pywikibot-core\tests\utils.py", line 297, in handle
    callable_obj(*args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 136, in wrapper
    handle(func, self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 128, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[wikidata:test:Q68]] failed:
modification-failed: Malformed input: oo [messages:[{'name': 'wikibase-validator-malformed-value', 'parameters': ['�oo'], 'html': {
'*': 'Malformed input: �oo'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce
mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and break
ing changes.]

======================================================================
ERROR: test_url_invalid_protocol (tests.edit_failure_tests.TestWikibaseSaveTest)
Attempt adding a URL with an invalid protocol to a url claim.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\pywikibot-core\pywikibot\page.py", line 118, in handle
    func(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 4444, in addClaim
    self.repo.addClaim(self, claim, bot=bot, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 1312, in callee
    return fn(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 7713, in addClaim
    data = req.submit()
  File "...\pywikibot-core\pywikibot\data\api.py", line 2195, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: modification-failed: An URL scheme "wtf" is not supported. [messages:[{'name': 'wikibase-validator-bad-
url-scheme', 'parameters': ['wtf'], 'html': {'*': 'An URL scheme "wtf" is not supported.'}}]; help:See https://test.wikidata.org/w/a
pi.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/media
wiki-api-announce> for notice of API deprecations and breaking changes.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\pywikibot-core\tests\edit_failure_tests.py", line 189, in test_url_invalid_protocol
    item.addClaim, claim)
  File "...\pywikibot-core\tests\aspects.py", line 317, in assertAPIError
    code, info, msg, self).handle(callable_obj, args, kwargs)
  File "...\pywikibot-core\tests\utils.py", line 297, in handle
    callable_obj(*args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 136, in wrapper
    handle(func, self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 128, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[wikidata:test:Q68]] failed:
modification-failed: An URL scheme "wtf" is not supported. [messages:[{'name': 'wikibase-validator-bad-url-scheme', 'parameters': ['
wtf'], 'html': {'*': 'An URL scheme "wtf" is not supported.'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscri
be to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for not
ice of API deprecations and breaking changes.]

======================================================================
ERROR: test_url_malformed_url (tests.edit_failure_tests.TestWikibaseSaveTest)
Attempt adding a malformed URL to a url claim.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "...\pywikibot-core\pywikibot\page.py", line 118, in handle
    func(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 4444, in addClaim
    self.repo.addClaim(self, claim, bot=bot, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 1312, in callee
    return fn(self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\site.py", line 7713, in addClaim
    data = req.submit()
  File "...\pywikibot-core\pywikibot\data\api.py", line 2195, in submit
    raise APIError(**result['error'])
pywikibot.data.api.APIError: modification-failed: This URL misses a scheme like "https://": Not a URL at all [messages:[{'name': 'wi
kibase-validator-url-scheme-missing', 'parameters': ['Not a URL at all'], 'html': {'*': 'This URL misses a scheme like "https://": N
ot a URL at all'}}]; help:See https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing lis
t at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes
.]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\pywikibot-core\tests\edit_failure_tests.py", line 179, in test_url_malformed_url
    item.addClaim, claim)
  File "...\pywikibot-core\tests\aspects.py", line 317, in assertAPIError
    code, info, msg, self).handle(callable_obj, args, kwargs)
  File "...\pywikibot-core\tests\utils.py", line 297, in handle
    callable_obj(*args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 136, in wrapper
    handle(func, self, *args, **kwargs)
  File "...\pywikibot-core\pywikibot\page.py", line 128, in handle
    raise pywikibot.OtherPageSaveError(self, err)
pywikibot.exceptions.OtherPageSaveError: Edit to page [[wikidata:test:Q68]] failed:
modification-failed: This URL misses a scheme like "https://": Not a URL at all [messages:[{'name': 'wikibase-validator-url-scheme-m
issing', 'parameters': ['Not a URL at all'], 'html': {'*': 'This URL misses a scheme like "https://": Not a URL at all'}}]; help:See
 https://test.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikime
dia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]

----------------------------------------------------------------------
Ran 6 tests in 22.560s

FAILED (errors=5)

TASK DETAIL
https://phabricator.wikimedia.org/T190864

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Magul, Tbscho, rafidaslam, MayS, Mdupont, JJMC89, Avicennasis, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to