Neod0Matrix / PixivCrawlerIII

A python3 crawler for crawling Pixiv ranking top and any illustrator all artworks
MIT License
36 stars 9 forks source link

TypeError: Object type <class 'str'> cannot be passed to C Code #2

Open Neod0Matrix opened 5 years ago

Neod0Matrix commented 5 years ago

If you have pycryptodome or pycryptodomex modules installed in your python runtime environment, since these two modules have the same method as the pycrypto import module used in this project, it is very likely that such an error occurs: TypeError: Object type <class 'str'> cannot be passed to C Code This is due to the different parameter data types passed by pycryptodome and pycrypto when constructing crypto using the new method. Solution:
1.Uninstall pycryptodome or pycryptodomex; 2.Use try and except to compatible two new methods.

Neod0Matrix commented 5 years ago

If you want to use newer module pycryptodome, you can modify here: dataload.py L60: image privmatrix.py L98: image privmatrix.py L133: image That's all.

Neod0Matrix commented 5 years ago

Version V2.8.5 has used pycryptodome instead of pycrypto.