Skip to content

wikitools.wiki.Wiki for biografias.bcn.cl: Invalid JSON #55

@nemobis

Description

@nemobis
>>> import wikitools
>>> site = wikitools.wiki.Wiki('http://biografias.bcn.cl/api.php')
Invalid JSON, trying request again
Invalid JSON, trying request again
Invalid JSON, trying request again
Invalid JSON, trying request again
Invalid JSON, trying request again
^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/federico/.local/lib/python2.7/site-packages/wikitools/wiki.py", line 95, in __init__
    self.setSiteinfo()
  File "/home/federico/.local/lib/python2.7/site-packages/wikitools/wiki.py", line 113, in setSiteinfo
    info = req.query(False)
  File "/home/federico/.local/lib/python2.7/site-packages/wikitools/api.py", line 158, in query
    rawdata = self.__getRaw()
  File "/home/federico/.local/lib/python2.7/site-packages/wikitools/api.py", line 270, in __getRaw
    data = gzip.GzipFile('', 'rb', 9, StringIO.StringIO(data.read()))
  File "/usr/lib64/python2.7/socket.py", line 355, in read
    data = self._sock.recv(rbufsize)
  File "/usr/lib64/python2.7/httplib.py", line 597, in read
    s = self.fp.read(amt)
  File "/usr/lib64/python2.7/socket.py", line 384, in read
    data = self._sock.recv(left)
KeyboardInterrupt

Note, this wiki has some weird webserver configuration which causes several problems. Apparently, api.php returns the HTML main page if you attempt to POST any data instead of POSTing the API parameters as URL parameters. I'm not sure that's the culprit though.

From WikiTeam/wikiteam#314

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions