Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
**Steps to replicate the issue** (include links if applicable):
`pwb -site:wowwiki:en page_tests -v TestPageObject.testLinks`
**What happens?**:
D:\pwb\GIT\core>pwb -site:wowwiki:en page_tests -v TestPageObject.testLinks
tests: max_retries reduced from 15 to 1
testLinks (__main__.TestPageObject.testLinks)
Test the different types of links from a page. ... 1
2
ERROR
17.205s
======================================================================
ERROR: testLinks (__main__.TestPageObject.testLinks)
Test the different types of links from a page.
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\pwb\GIT\core\tests\page_tests.py", line 517, in testLinks
for p in mainpage.linkedPages():
File "<frozen _collections_abc>", line 330, in __next__
File "D:\pwb\GIT\core\pywikibot\tools\collections.py", line 275, in send
return next(self._started_gen)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pwb\GIT\core\pywikibot\data\api\_generators.py", line 610, in
generator
self.data = self.request.submit()
^^^^^^^^^^^^^^^^^^^^^
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 1257, in
submit
self._data = super().submit()
^^^^^^^^^^^^^^^^
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 972, in
submit
result = self._json_loads(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 757, in
_json_loads
self.wait()
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 1103, in wait
raise TimeoutError('Maximum retries attempted without success.')
pywikibot.exceptions.TimeoutError: Maximum retries attempted without
success.
----------------------------------------------------------------------
Ran 1 test in 17.711s
FAILED (errors=1)
The reason is a failing `linkesPages()` method.
Using a direct call gives:
import pywikibot
site = pywikibot.Site('wowwiki:en')
maintitle = site.siteinfo['mainpage']
maintitle
'Portal:Main'
mainpage = pywikibot.Page(site, maintitle)
gen = mainpage.linkedPages()
gen
<pywikibot.data.api._generators.PageGenerator object at 0x000001AA0B3298D0>
x = list(gen)
WARNING: Non-JSON response received from server wowwiki:en for url
https://wowwiki-archive.fandom.com/api.php
The server may be down.
Status code: 200
The text message is:
MediaWiki API help | WoWWiki | Fandom
Set gpllimit = ['250']
WARNING: Waiting 5.0 seconds before retrying.
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
x = list(gen)
File "<frozen _collections_abc>", line 330, in __next__
File "D:\pwb\GIT\core\pywikibot\tools\collections.py", line 275, in send
return next(self._started_gen)
File "D:\pwb\GIT\core\pywikibot\data\api\_generators.py", line 610, in
generator
self.data = self.request.submit()
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 972, in
submit
result = self._json_loads(response)
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 757, in
_json_loads
self.wait()
File "D:\pwb\GIT\core\pywikibot\data\api\_requests.py", line 1111, in wait
pywikibot.sleep(delay)
File "D:\pwb\GIT\core\pywikibot\__init__.py", line 1394, in sleep
time_sleep(secs)
KeyboardInterrupt
Probably the family file is oudated
TASK DETAIL
https://phabricator.wikimedia.org/T334834
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01,
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Framawiki,
Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, jayvdb,
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]