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

fix/huge_integer_error #58

Merged
merged 2 commits into from
Oct 23, 2023
Merged

fix/huge_integer_error #58

merged 2 commits into from
Oct 23, 2023

Conversation

JarbasAl
Copy link
Member

timeout is getting multiplied by 60 every time it is serialized/deserialized, conversion from seconds to minutes should only be done when assigning the default value from config

exception calling callback for <Future at 0x7f3c5ff8d0 state=finished raised ValueError>
Traceback (most recent call last):
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 340, in _invoke_callbacks
    callback(self)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_executor.py", line 57, in _callback
    self.emit("error", exc)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_base.py", line 118, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_base.py", line 88, in _emit_handle_potential_error
    raise error
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_bus_client/client/client.py", line 162, in on_default_session_update
    SessionManager.update(sess, make_default=True)
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_bus_client/session.py", line 538, in update
    LOG.debug(f"replacing default session with: {sess.serialize()}")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit

timeout is getting multiplied by 60 every time it is serialized/deserialized, conversion from seconds to minutes should only be done when assigning the default value from config

```
exception calling callback for <Future at 0x7f3c5ff8d0 state=finished raised ValueError>
Traceback (most recent call last):
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 340, in _invoke_callbacks
    callback(self)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_executor.py", line 57, in _callback
    self.emit("error", exc)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_base.py", line 118, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "/home/ovos/.venv/lib/python3.11/site-packages/pyee/_base.py", line 88, in _emit_handle_potential_error
    raise error
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_bus_client/client/client.py", line 162, in on_default_session_update
    SessionManager.update(sess, make_default=True)
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_bus_client/session.py", line 538, in update
    LOG.debug(f"replacing default session with: {sess.serialize()}")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit

```
@JarbasAl JarbasAl added the bug Something isn't working label Oct 23, 2023
Copy link

@ChanceNCounter ChanceNCounter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there’s a possibility the timeout can be changed at runtime to an unsuitable value, it might be worth the hit from setting it where it was before, but with bounds.

Otherwise, this solves the problem.

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (6616569) 53.58% compared to head (e55cc35) 52.92%.
Report is 11 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #58      +/-   ##
==========================================
- Coverage   53.58%   52.92%   -0.67%     
==========================================
  Files          14       14              
  Lines        1073     1111      +38     
==========================================
+ Hits          575      588      +13     
- Misses        498      523      +25     
Files Coverage Δ
ovos_bus_client/client/waiter.py 82.75% <100.00%> (+3.59%) ⬆️
ovos_bus_client/version.py 0.00% <0.00%> (ø)
ovos_bus_client/client/client.py 37.61% <75.00%> (+3.18%) ⬆️
ovos_bus_client/session.py 55.24% <66.66%> (-0.32%) ⬇️
ovos_bus_client/scripts.py 11.94% <6.45%> (-4.73%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JarbasAl JarbasAl added the severe critical bug, fix ASAP label Oct 23, 2023
@JarbasAl JarbasAl merged commit fd6f1a6 into dev Oct 23, 2023
6 of 7 checks passed
@JarbasAl JarbasAl deleted the fix/huge_integer_error branch October 23, 2023 22:25
This was referenced Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working severe critical bug, fix ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants