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

TASK DESCRIPTION

https://travis-ci.org/wikimedia/pywikibot-core/jobs/258297193#L4647

======================================================================

ERROR: test_newest (tests.weblinkchecker_tests.TestMementoDefault)

Test getting memento for newest https://google.com.

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/wikimedia/pywikibot-core/tests/weblinkchecker_tests.py", line 85, in test_newest

    archivedversion = self._get_archive_url('https://google.com')

  File "/home/travis/build/wikimedia/pywikibot-core/tests/weblinkchecker_tests.py", line 38, in _get_archive_url

    url, when, self.timegate_uri)

  File "/home/travis/build/wikimedia/pywikibot-core/scripts/weblinkchecker.py", line 199, in _get_closest_memento_url

    memento_info = mc.get_memento_info(url, when)

  File "/home/travis/virtualenv/python3.6.2/lib/python3.6/site-packages/memento_client/memento_client.py", line 142, in get_memento_info

    req_uri_response = kwargs.pop("req_uri_response")  # for reading the headers of the req uri to find uri_r

KeyError: 'req_uri_response'

======================================================================

ERROR: test_newest (tests.weblinkchecker_tests.TestMementoWebCite)

Test WebCite for newest https://google.com.

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/wikimedia/pywikibot-core/tests/weblinkchecker_tests.py", line 70, in test_newest

    archivedversion = self._get_archive_url('https://google.com')

  File "/home/travis/build/wikimedia/pywikibot-core/tests/weblinkchecker_tests.py", line 38, in _get_archive_url

    url, when, self.timegate_uri)

  File "/home/travis/build/wikimedia/pywikibot-core/scripts/weblinkchecker.py", line 199, in _get_closest_memento_url

    memento_info = mc.get_memento_info(url, when)

  File "/home/travis/virtualenv/python3.6.2/lib/python3.6/site-packages/memento_client/memento_client.py", line 142, in get_memento_info

    req_uri_response = kwargs.pop("req_uri_response")  # for reading the headers of the req uri to find uri_r

KeyError: 'req_uri_response'

======================================================================

FAIL: test_invalid (tests.weblinkchecker_tests.TestMementoDefault)

Test getting memento for invalid URL.

----------------------------------------------------------------------

KeyError: 'req_uri_response'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/home/travis/build/wikimedia/pywikibot-core/tests/weblinkchecker_tests.py", line 93, in test_invalid

    self._get_archive_url, 'invalid')

AssertionError: "Only HTTP URIs are supported" does not match "'req_uri_response'"

The issue seems to have been caused by the latest changes in memento-client which has effectively made three new required arguments for get_memento_info. (req_uri_response, org_response, and tg_response)

Adding them to the call with a default value of None should fix the issue for us.


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

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

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

Reply via email to