Skip to content

ImportError: cannot import name 'RPCResponse' from 'solana.rpc.types' #113

@Broever101

Description

@Broever101

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions