Skip to content

Websock account_subscribe encoding issue #537

@nicholaswood

Description

@nicholaswood

I'm not sure if this is an issue specifically with Quicknode or not, but I'm trying to a fairly simple websocket account subscription and I'm getting some odd behavior.

await websocket.account_subscribe( pubkey=POOL_ID, commitment=COMMITMENT, encoding="base58" # Reqeust compressed encoding )

If I use "base58" I get the follow error

2025-04-11 16:44:08,802 - ERROR - An error occurred with the WebSocket connection or subscription: a list or single element Traceback (most recent call last): File "/raydium_monitor.py", line 64, in subscribe_and_log async for msg in websocket: File "/envs/solana/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 497, in __aiter__ yield await self.recv() File "/envs/solana/lib/python3.10/site-packages/solana/rpc/websocket_api.py", line 112, in recv return self._process_rpc_response(cast(str, data)) File "/envs/solana/lib/python3.10/site-packages/solana/rpc/websocket_api.py", line 395, in _process_rpc_response parsed = parse_websocket_message(raw) solders.SerdeJSONError: a list or single element

I'm using solana 0.36.6 and solders 0.26.0. I looked into the solders code, but I'm not sure why the raw websocket message would be any different. Trying a few others I get the same error with encoding "binary".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions