Skip to content
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

super() argument 1 must be type, not classobj #485

Open
BotJohn opened this issue Oct 24, 2024 · 5 comments
Open

super() argument 1 must be type, not classobj #485

BotJohn opened this issue Oct 24, 2024 · 5 comments

Comments

@BotJohn
Copy link

BotJohn commented Oct 24, 2024

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

@nemobis
Copy link
Member

nemobis commented Oct 24, 2024

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

@BotJohn
Copy link
Author

BotJohn commented Oct 25, 2024

0.11, installed via pip.

@Anonymous3-a
Copy link

Same error, any help?

@Anonymous3-a
Copy link

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

@agnelvishal
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@nemobis @agnelvishal @BotJohn @Anonymous3-a and others