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

simplejson.errors.JSONDecodeError in Getting the XML header from the API #379

Open
nemobis opened this issue Mar 18, 2020 · 1 comment
Open
Labels
Milestone

Comments

@nemobis
Copy link
Member

nemobis commented Mar 18, 2020

Worth fixing soon given this wiki is closing:


https://wiki.dystify.com/api.php
Getting the XML header from the API
Traceback (most recent call last):
  File "dumpgenerator.py", line 2528, in <module>
    main()
  File "dumpgenerator.py", line 2520, in main
    createNewDump(config=config, other=other)
  File "dumpgenerator.py", line 2087, in createNewDump
    generateXMLDump(config=config, titles=titles, session=other['session'])
  File "dumpgenerator.py", line 709, in generateXMLDump
    header, config = getXMLHeader(config=config, session=session)
  File "dumpgenerator.py", line 429, in getXMLHeader
    xml = r.json()['query']['export']['*']
  File "/home/users/federico/.local/lib/python2.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@nemobis nemobis added the bug label Mar 18, 2020
@nemobis nemobis added this to the 0.4 milestone Mar 18, 2020
@nemobis
Copy link
Member Author

nemobis commented Mar 18, 2020

$ python dumpgenerator.py --xml --index=https://wiki.dystify.com/index.php
API not available. Trying with index.php only.
ERROR: The wiki returned status code HTTP 406
Error in index.php.
Please, provide a correct path to index.php or use --xmlrevisions. Terminating.

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

No branches or pull requests

1 participant