pywebcopy icon indicating copy to clipboard operation
pywebcopy copied to clipboard

python 3.10.4 : TypeError: multiple bases have instance lay-out conflict

Open anshi43 opened this issue 3 years ago • 11 comments

This is the code

from pywebcopy import save_webpage

kwargs = {'project_name': 'site folder'}

save_webpage(

# url pf the website
url='https://www.geeksforgeeks.org/data-structures/linked-list/',

# folder where the copy will be saved
project_folder='C:\\Desktop\free',
**kwargs

)

####################################################

This the error occurs

Traceback (most recent call last): File "C:\Users\akmv\Desktop\free\app.py", line 14, in from pywebcopy import save_webpage File "C:\Users\akmv\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebcopy_init_.py", line 49, in from .configs import config, SESSION File "C:\Users\akmv\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebcopy\configs.py", line 18, in from .exceptions import AccessError File "C:\Users\akmv\AppData\Local\Programs\Python\Python310\lib\site-packages\pywebcopy\exceptions.py", line 46, in class UrlTransformerNotSetup(PywebcopyError, UnboundLocalError): TypeError: multiple bases have instance lay-out conflict

How can I solve this error?

Thank you very much in advance!

anshi43 avatar Apr 11 '22 08:04 anshi43

Did you read issue #90 or not?

rajatomar788 avatar Apr 11 '22 12:04 rajatomar788

I did.

anshi43 avatar Apr 11 '22 12:04 anshi43

Could you please tell the solution? TIA

anshi43 avatar Apr 11 '22 15:04 anshi43

This is a python 3.10 problem, so it can only be fixed by rewriting the portions of the code.

rajatomar788 avatar Apr 11 '22 16:04 rajatomar788

what should i change in code ? Could you please tell ? TIA

anshi43 avatar Apr 11 '22 16:04 anshi43

You have to change the inheritance of error classes from multiple bases to just a single base class as the error says.

rajatomar788 avatar Apr 11 '22 17:04 rajatomar788

I do not know where to change in code. Could you please show me? TIA

anshi43 avatar Apr 12 '22 05:04 anshi43

???

anshi43 avatar Apr 13 '22 06:04 anshi43

Just download python version below 3.9 and done.

rajatomar788 avatar Apr 13 '22 11:04 rajatomar788

Just download python version below 3.9 and done.

Does it works on 3.8? On pypi it shows 3.7 is the latest it can work with.

Frutto-Hub avatar Apr 24 '22 23:04 Frutto-Hub

@Frutto-Hub yes it works on 3.7 & 3.8 and also on 3.9

rajatomar788 avatar Apr 25 '22 06:04 rajatomar788