Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionFailedException with empty websocket response / receiving empty string #309

Open
ross-spencer opened this issue Feb 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ross-spencer
Copy link

Describe the bug
A clear and concise description of what the bug is.

Result in the section of code below might not be an error, rather an empty string:

TransactionFailedException might be an appropriate response, but the formatting for the error string looks like it's masking something else.

Suggest some way of delineating the message, e.g. using single quotes around the f-string expression? e.g. f"some response: {response}`".

Though maybe there's a better way of handling an empty response from .recv()?

To Reproduce
Steps to reproduce the behavior. e.g. A python script.

I can't reliably recreate this yet, I am seeing it in a long-running process making a lot of requests to Ogmios 5.x.

Logs
If applicable, add logs to help explain your problem.

Expected behavior
A clear and concise description of what you expected to happen.

As per above, more clarity on whether the response is blank or if there's more data to be seen.

Environment and software version (please complete the following information):

  • OS: [e.g. Ubuntu 20.04.3 LTS, Mac OS 12.1]
  • PyCardano Version [e.g. 0.1.1]

PyCardano 0.10.0.

Additional context
Add any other context about the problem here.

Example:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/ross-spencer/git/a_project/main.py", line 699, in <module>
    main()
  File "/home/ross-spencer/git/a_project/main.py", line 695, in main
    asyncio.run(cnt_main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/ross-spencer/git/a_project/main.py", line 670, in cnt_main
    messages, timestamp = await do_something()
  File "/home/ross-spencer/git/a_project/main.py", line 659, in do_something
    pool.map(do_another_thing, DEX_PAIRS)
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
pycardano.exception.TransactionFailedException: Ogmios ran into an error. Reponse: 
@nielstron nielstron added the bug Something isn't working label Feb 20, 2024
@nielstron nielstron changed the title TransactionFailedException for empty websocket response / receiving empty string TransactionFailedException with empty websocket response / receiving empty string Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants