Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaWiki 1.15 or 1.16 fails with TypeError: 'NoneType' object is not iterable #348

Closed
nemobis opened this issue Feb 8, 2020 · 3 comments
Milestone

Comments

@nemobis
Copy link
Member

nemobis commented Feb 8, 2020

Current master, normal --xml --api:

Analysing http://wiki.apnchanger.org/index.php
Trying generating a new dump into a new directory...
Loading page titles from namespaces = all
Excluding titles from namespaces = None
Sleeping... 1 seconds...
Error: could not get namespaces from the API request
...
Traceback (most recent call last):
  File "./dumpgenerator.py", line 2328, in <module>
    main()
  File "./dumpgenerator.py", line 2320, in main
    createNewDump(config=config, other=other)
  File "./dumpgenerator.py", line 1885, in createNewDump
    getPageTitles(config=config, session=other['session'])
  File "./dumpgenerator.py", line 429, in getPageTitles
    for title in titles:
  File "./dumpgenerator.py", line 252, in getPageTitlesAPI
    config=config, session=session)
TypeError: 'NoneType' object is not iterable
tail: cannot open 'wikiapnchangerorg-20200208-wikidump/wikiapnchangerorg-20200208-history.xml' for reading: No such file or directory
No </mediawiki> tag found: dump failed, needs fixing; resume didn't work. Exiting.
@nemobis
Copy link
Member Author

nemobis commented Feb 8, 2020

Same with MediaWiki 1.15 https://wiki.foppa.dk/index.php/Main_Page

API not available. Trying with index.php only.
Checking index.php... http://wiki.foppa.dk/index.php
index.php is OK
...
Traceback (most recent call last):
  File "./dumpgenerator.py", line 2328, in <module>
    main()
  File "./dumpgenerator.py", line 2320, in main
    createNewDump(config=config, other=other)
  File "./dumpgenerator.py", line 1885, in createNewDump
    getPageTitles(config=config, session=other['session'])
  File "./dumpgenerator.py", line 429, in getPageTitles
    for title in titles:
  File "./dumpgenerator.py", line 252, in getPageTitlesAPI
    config=config, session=session)
TypeError: 'NoneType' object is not iterable
tail: cannot open 'wikifoppadk-20200208-wikidump/wikifoppadk-20200208-history.xml' for reading: No such file or directory
No </mediawiki> tag found: dump failed, needs fixing; resume didn't work. Exiting.

https://wiki.foppa.dk/api.php?action=query&meta=siteinfo&siprop=namespaces&format=json seems ok and seems to work in 3d04dcb

@nemobis
Copy link
Member Author

nemobis commented Feb 8, 2020

Still happens after that commit on some wiki (1.16.5), seems to work locally though:

Analysing http://www.dharmakaya.ru/mediawiki/index.php
Trying generating a new dump into a new directory...
Loading page titles from namespaces = all
Excluding titles from namespaces = None
Sleeping... 1 seconds...
Error: could not get namespaces from the API request
HTTP 200                                        
...
Traceback (most recent call last):
  File "./dumpgenerator.py", line 2323, in <module>
    main()
  File "./dumpgenerator.py", line 2315, in main
    createNewDump(config=config, other=other)
  File "./dumpgenerator.py", line 1880, in createNewDump
    getPageTitles(config=config, session=other['session'])
  File "./dumpgenerator.py", line 429, in getPageTitles
    for title in titles:
  File "./dumpgenerator.py", line 252, in getPageTitlesAPI
    config=config, session=session)
TypeError: 'NoneType' object is not iterable
tail: cannot open 'dharmakayaru_mediawiki-20200208-wikidump/dharmakayaru_mediawiki-20200208-history.xml' for reading: No such file or directory
No </mediawiki> tag found: dump failed, needs fixing; resume didn't work. Exiting.

@nemobis nemobis added this to the 0.4 milestone Feb 10, 2020
@nemobis nemobis changed the title MediaWiki 1.16 fails with Error: could not get namespaces from the API request MediaWiki 1.15 or 1.16 fails with TypeError: 'NoneType' object is not iterable Feb 10, 2020
@nemobis
Copy link
Member Author

nemobis commented Feb 10, 2020

If there's no namespace to ask for we can't do much, but we can avoid the specific error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant