wikiteam icon indicating copy to clipboard operation
wikiteam copied to clipboard

super() argument 1 must be type, not classobj

Open BotJohn opened this issue 1 year ago • 6 comments

When trying to scrape a wiki, I get the following error: 40 namespaces found Retrieving titles in the namespace 0 Traceback (most recent call last): File "dumpgenerator.py", line 2572, in main() File "dumpgenerator.py", line 2564, in main createNewDump(config=config, other=other) File "dumpgenerator.py", line 2133, 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, pool=session) File "C:\Python27\lib\site-packages\mwclient\client.py", line 169, in init self.pages = listing.PageList(self) File "C:\Python27\lib\site-packages\mwclient\listing.py", line 242, in init super(PageList, self).init(site, 'allpages', 'ap', TypeError: super() argument 1 must be type, not classobj

BotJohn avatar Oct 24 '24 08:10 BotJohn

What version of mwclient do you have? How did you install it?

nemobis avatar Oct 24 '24 16:10 nemobis

0.11, installed via pip.

BotJohn avatar Oct 25 '24 03:10 BotJohn

Same error, any help?

Anonymous3-a avatar Oct 27 '24 23:10 Anonymous3-a

Ok, try this: run pip --force-reinstall "mwclient==0.10". It's not giving the error now, it seems like it's working?

Anonymous3-a avatar Oct 27 '24 23:10 Anonymous3-a

Faced same issue. The below solved. pip install "mwclient==0.10"

agnelvishal avatar Oct 31 '24 16:10 agnelvishal

The --force-reinstall command just returns an error, but the install command @agnelvishal replied with works.

TangentFoxy avatar Feb 08 '25 23:02 TangentFoxy