polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 114 forks source link

Metaclass issue when using SubstrateInterface() #165

Closed SimplyDanielAzzopardi closed 2 years ago

SimplyDanielAzzopardi commented 2 years ago

I am trying to use SubstrateInterface() to get node data but am currently getting the following error:

Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: <module>) metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

This error comes up in the instantiation of the class with IP of the node. Does anyone else have any experience with this error and know how to fix it? I am working on Python 3.8.10 and SubstrateInterface version 1.0.5.

arjanz commented 2 years ago

Have you tried upgrading packages substrate-interface and scalecodec to latest versions?

Anaski99 commented 2 years ago

Hello, I'm having the same issue. If you update substrate-interface to 1.1.4 and scalecodec to 1.0.26, you end up with "ModuleNotFoundError: No module named 'scalecodec.block'" in harvester-api :( Also, ed25519 module is missing in harvester app requirements.txt

Anaski99 commented 2 years ago

@arjanz any news ?

arjanz commented 2 years ago

@x20ab I'm not certain what context you are using the library but I assume the Polkascan OS blockexplorer (https://github.com/polkascan/polkascan-os)? That application isn't that actively maintained and hasn't been updated for a while, but when I have some time to spare I'll have a look if I can make it work again.