async offers stream return 406 error
See original GitHub issueAs I read in the documentation, everything seems to be supported: https://stellar-sdk.readthedocs.io/en/stable/api.html?highlight=server.offers().for_seller().cursor#id9 There is almost no search for information on 406 errors in the SDK. Thanks in advance for replies and advice.
ps: tried both on the local horizon server and on the main code:
HORIZON_URL = "https://horizon.stellar.org"
async def offers(acc1):
async with ServerAsync(HORIZON_URL, AiohttpClient()) as server:
async for offers in server.offers().for_seller(acc1).cursor(cursor=last_cursor).stream():
ofr2df(offers) ## acc_offers
# print(f"\nacc: {acc}\n offers len: {len(offers)}")
error:
ConnectionError: fetch https://horizon.stellar.org/offers failed: 406
the function is called like this:
async def listen():
global acc
await asyncio.gather(
await asyncio.get_running_loop().run_in_executor(None, offers, acc[1])
)
if __name__ == "__main__":
asyncio.run(listen())
pps: sdk update 8.0 beta
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Why does my Twitter stream give me the HTTP Error: 406?
A 406 Not Acceptable HTTP Error means: At least one request parameter is invalid. For example, the filter endpoint returns this status if:....
Read more >How to Fix a 406 Error and Find the Source of the Problem
The primary way to address and fix a 406 error is by checking the source code for issues in the Accept-, Request-, and...
Read more >Request failed with status code 406 · Issue #43 - GitHub
Error 406 means the http code that create persistent subscription on $ce-user has an issue. Stream does exists ?
Read more >406 Not Acceptable: What It Is and How to Fix It - Airbrake Blog
The 406 Not Acceptable is an HTTP response status code indicating that the client has requested a response using Accept- headers that the ......
Read more >17. Web MVC framework - Spring
Type mismatches as application-level validation errors that keep the offending value, ... The Spring DispatcherServlet also supports the return of the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much for the quick response. Is this a bug in horizon server?
Is there another option to get a list of account offers stream?
UPDATE: who needs a working tool, here it is:
as a result there will be a lot of unnecessary, you need to filter (for example: “type”==“manage_sell_offer”)
It is inherited from the parent class. In fact, it does not support stream. I will improve it in the coming release, sorry for causing you trouble.