-
Notifications
You must be signed in to change notification settings - Fork 152
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
[Newbie] TypeError: __init__() got an unexpected keyword argument 'scheme' #405
Comments
Il 09/04/21 10:49, losershutin ha scritto:
I'm completely new to using Python programs, so I might be doing something completely wrong.
What version of mwclient have you installed?
|
I have mwclient 0.6.5 installed. |
Il 09/04/21 14:24, losershutin ha scritto:
I have mwclient 0.6.5 installed.
That's ancient, released in 2011. You could test with different versions
and let us know what works, or send a patch to support such ancient
versions of the library, or use an older version of dumpgenerator.
|
I faced the same issue due to the deprecation of Python 2.7 in FreeBSD; the one I found was mwlib 0.9.3. I got it working by modifying the end of the line starting If the scheme you have to use is actually http you may want to modify the line I also commented out Obviously, what nemobis suggests is better, but the above may be faster. |
I could also remove this scheme "guessing" from master, but at the time
it was the only way I managed to archive a few hundreds wikis which were
on record with the wrong scheme. It might be unnecessary if someone
improved checkalive.py instead, to make a list of API URLs in the
correct scheme.
|
I've been trying to get this working with EditThis. mwclient only supports MediaWiki 1.16 and upwards in latest, while EditThis runs MediaWiki 1.15. So, since the last mwclient that supports MediaWiki 1.15 was 0.6.5, released in 2011, I've been having trouble getting it to work with the latest dumpgenerator. When was the scheme stuff implemented? @GreenReaper's solution does not work as 0.6.5 is much older than 0.9.3, so I'm curious what version of dumpgenerator I should be using with mwclient 0.6.5. |
That's a different matter. We probably need to pin a previous version or avoid using mwclient if we can't use it any more for older wikis... |
I'm completely new to using Python programs, so I might be doing something completely wrong. I have nothing else to add except my Command Prompt log. I'm using Windows, by the way.
Analysing https://trollpasta.miraheze.org/w/api.php
Trying generating a new dump into a new directory...
Loading page titles from namespaces = all
Excluding titles from namespaces = None
28 namespaces found
Retrieving titles in the namespace 0
Traceback (most recent call last):
File "dumpgenerator.py", line 2569, in
main()
File "dumpgenerator.py", line 2561, in main
createNewDump(config=config, other=other)
File "dumpgenerator.py", line 2126, in createNewDump
getPageTitles(config=config, session=other['session'])
File "dumpgenerator.py", line 391, in getPageTitles
for title in titles:
File "dumpgenerator.py", line 261, in getPageTitlesAPI
site = mwclient.Site(apiurl.netloc, apiurl.path.replace("api.php", ""), scheme=apiurl.scheme)
TypeError: init() got an unexpected keyword argument 'scheme'
The text was updated successfully, but these errors were encountered: