I'm trying to get pywikibot set up for the first time. It's on a Miraheze site and I'm getting this error when I try to log in:
----------- WARNING: Non-JSON response received from server comprehensibleinputwiki:en for url https://comprehensibleinput.miraheze.org/w/api.php The server may be down. Status code: 200
The text message is:
MediaWiki API help - Comprehensible Input Wiki document.documentElement.className="client-js";RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"7a406c0d0d1c2121406e444b","wgCSPNonce":false,"wgCanonicalNamespace":"Special","wgCanonicalSpecialPageName":"ApiHelp","wgNamespaceNumber":-1,"wgPageName":"Special:ApiHelp","wgTitle":"ApiHelp","wgCurRevisionId":0,"wgRevisionId":0,"wgArticleId":0,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Special:ApiHelp","wgRelevantArticleId":0,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgNoticeProject":"all",
... ------------
So it seems that it can access the page, but is not parsing it correctly for some reason. Anyone know what the issue is?
What MediaWiki version uses that site?
osmiumsky@tutanota.com ezt írta (időpont: 2022. dec. 17., Szo, 18:11):
I'm trying to get pywikibot set up for the first time. It's on a Miraheze site and I'm getting this error when I try to log in:
WARNING: Non-JSON response received from server comprehensibleinputwiki:en for url https://comprehensibleinput.miraheze.org/w/api.php The server may be down. Status code: 200
The text message is:
MediaWiki API help - Comprehensible Input Wiki
document.documentElement.className="client-js";RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"7a406c0d0d1c2121406e444b","wgCSPNonce":false,"wgCanonicalNamespace":"Special","wgCanonicalSpecialPageName":"ApiHelp","wgNamespaceNumber":-1,"wgPageName":"Special:ApiHelp","wgTitle":"ApiHelp","wgCurRevisionId":0,"wgRevisionId":0,"wgArticleId":0,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Special:ApiHelp","wgRelevantArticleId":0,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgNoticeProject":"all",
...
So it seems that it can access the page, but is not parsing it correctly for some reason. Anyone know what the issue is?
pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
info@gno.de ezt írta (időpont: 2022. dec. 18., V, 9:22):
It is 1.38.4
That is not too old, the problem should be elsewhere.
If it helps, here are pywikibot/user-config.py and pywikibot/pywikibot/families/comprehensibleinputwiki.py, the only two files I changed.
------------------------ mylang = 'en' family = 'comprehensibleinputwiki' usernames['comprehensibleinputwiki']['en'] = 'LangoBot' console_encoding = 'utf-8' ------------------------
------------------------ from pywikibot import family
# The official Mozilla Wiki. #Put a short project description here.
class Family(family.Family): name = 'comprehensibleinputwiki' # Set the family name; this should be the > langs = { 'en': 'comprehensibleinput.miraheze.org', # Put the hostname here. }
# Translation used on all wikis for the different namespaces. # Most namespaces are inherited from family.Family. # Check the family.py file (in main directory) to see the standard # namespace translations for each known language. # You only need to enter translations that differ from the default. # namespaces[4] = { # '_default': 'Meta', # Specify the project namespace here. # }
# namespaces[5] = { # '_default': 'Meta talk', # Specify the talk page of the project namesp> # }
def version(self, code): return "1.38.4" # The MediaWiki version used.
def scriptpath(self, code): return '/w' # The relative path of index.php, api.php : look at your wi> # This line may need to be changed to /wiki or /w, # depending on the folder where your mediawiki program is located. # Note: Do not _include_ index.php, etc. -----------------------------
Dec 18, 2022, 05:22 by wikiposta@gmail.com:
<> info@gno.de> > ezt írta (időpont: 2022. dec. 18., V, 9:22):
It is 1.38.4
That is not too old, the problem should be elsewhere.