pyserum
pyserum copied to clipboard
ImportError: cannot import name 'RPCResponse' from 'solana.rpc.types'
While running the example code:
from pyserum.connection import get_live_markets, get_token_mints
print("tokens: ")
print(get_token_mints())
print("markets: ")
print(get_live_markets())
The error:
ImportError Traceback (most recent call last)
[<ipython-input-2-3233e15d8b3e>](https://localhost:8080/#) in <module>
----> 1 from pyserum.connection import get_live_markets, get_token_mints
2 print("tokens: ")
3 print(get_token_mints())
4 print("markets: ")
5 print(get_live_markets())
2 frames
[/usr/local/lib/python3.7/dist-packages/pyserum/market/market.py](https://localhost:8080/#) in <module>
7 from solana.publickey import PublicKey
8 from solana.rpc.api import Client
----> 9 from solana.rpc.types import RPCResponse, TxOpts
10 from solana.transaction import Transaction
11
ImportError: cannot import name 'RPCResponse' from 'solana.rpc.types' (/usr/local/lib/python3.7/dist-packages/solana/rpc/types.py)
Checking out the latest solana.rpc.types
, there really is no RPCResponse
.
https://github.com/michaelhly/solana-py/blob/master/src/solana/rpc/types.py
Any pointers/fixes?