Forums

Pywikibot on pythonanywhere

Hi, I have git cloned pywikibot (https://www.mediawiki.org/wiki/Manual:Pywikibot) to my account, but I am unable to run the scripts needed to login to and edit wikipedia. Is it because of free account restrictions? Thanks for a reply.

The Error msg is:

ERROR: Traceback (most recent call last):
File "/home/Zef/core/pywikibot/data/api.py", line 306, in submit
body=paramstring)
File "/home/Zef/core/pywikibot/comms/http.py", line 166, in request
raise request.data
ResponseNotReady

[edited by admin: formatting]

You're allowed access to all subdomains of wikipedia.org from a free account, so I don't think it's that specifically. The error sounds like it's quite low down inside pywikibot, as if it's trying to reuse a connection incorrectly, or isn't reading everything from a request before it tries to move on to another (see this Stack Overflow post).

Is there any more in the error message?

  :::python
  === Pywikibot framework v2.0 -- Logging header ===
  COMMAND: ['login.py', '-verbose']
  DATE: 2014-06-24 20:27:59.402778 UTC
  VERSION: [https] r-pywikibot-core.git (28b8b95, g3426, 2014/06/24, 01:37:10, n/a)
  Found 1 wikipedia:cs processes running, including this one.
  ERROR: Traceback (most recent call last):
  File "/home/Zef/core/pywikibot/data/api.py", line 306, in submit
  body=paramstring)
  File "/home/Zef/core/pywikibot/comms/http.py", line 166, in request
  raise request.data
  ResponseNotReady


  /w/api.php, maxlag=5&format=json&meta=siteinfo%7Cuserinfo&action=query&siprop=general%7Cnamespaces%7Cnamespacealiases%7Cextensions&uiprop=blockinfo%7Chasmsg
WARNING: Waiting 5 seconds before retrying.

Can I help somehow with the error? I am only end-user of this script :/ Thank you for your help!