sora-xor / PythonBot

Python Bot that can trade on Polkaswap (SORA network)
Apache License 2.0
8 stars 6 forks source link

Unsupported type registry preset "metadata_types" #24

Open XORchad opened 1 year ago

XORchad commented 1 year ago
Traceback (most recent call last):
  File "/home/ss/Crypto/PythonBot-master/PythonBot.py", line 6, in <module>
    substrate = SubstrateInterface(
  File "/home/ss/.local/lib/python3.10/site-packages/substrateinterface/base.py", line 582, in __init__
    self.reload_type_registry(use_remote_preset=use_remote_preset, auto_discover=auto_discover)
  File "/home/ss/.local/lib/python3.10/site-packages/substrateinterface/base.py", line 3085, in reload_type_registry
    self.runtime_config.update_type_registry(load_type_registry_preset(name="metadata_types"))
  File "/home/ss/.local/lib/python3.10/site-packages/scalecodec/type_registry/__init__.py", line 46, in load_type_registry_preset
    raise ValueError(f'Unsupported type registry preset "{name}"')
ValueError: Unsupported type registry preset "metadata_types"

Receiving the error when attempting to run; substrate-interface and scalecodec are installed - have tried both, with its latest and required versions.

XORchad commented 1 year ago

@takemiyamakoto would appreciate some help here

takemiyamakoto commented 1 year ago

Make sure it says: type_registry_preset='default', at the top when you initialize substrate interface

XORchad commented 1 year ago

Make sure it says: type_registry_preset='default', at the top when you initialize substrate interface

It is there. I am using same code as in the repo.

Here is what I get if I use latest versions of substrate-interface and scalecodec

Traceback (most recent call last): File "/home/ss/Crypto/PythonBot-master/BOT_PSWAP_EDIT.py", line 7, in <module> substrate = SubstrateInterface( File "/home/ss/.local/lib/python3.10/site-packages/substrateinterface/base.py", line 165, in __init__ self.reload_type_registry(use_remote_preset=use_remote_preset, auto_discover=auto_discover) File "/home/ss/.local/lib/python3.10/site-packages/substrateinterface/base.py", line 2948, in reload_type_registry self.apply_type_registry_presets(use_remote_preset=use_remote_preset, auto_discover=auto_discover) File "/home/ss/.local/lib/python3.10/site-packages/substrateinterface/base.py", line 2953, in apply_type_registry_presets type_registry_preset_dict = load_type_registry_preset( File "/home/ss/.local/lib/python3.10/site-packages/scalecodec/type_registry/__init__.py", line 46, in load_type_registry_preset raise ValueError(f'Unsupported type registry preset "{name}"') ValueError: Unsupported type registry preset "default"