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

OverflowError: Python int too large to convert to C long #12

Open
mikeyrf opened this issue Jun 21, 2021 · 0 comments
Open

OverflowError: Python int too large to convert to C long #12

mikeyrf opened this issue Jun 21, 2021 · 0 comments

Comments

@mikeyrf
Copy link
Contributor

mikeyrf commented Jun 21, 2021

Getting the following error for certain pairs when running influx_metrics script:

id Sushiswap: YFI / WETH
Fetching prices for Sushiswap: YFI / WETH ...
Number of days between latest and first data point: 29 days 23:42:57
Failed to write quote stats to influx
ERROR:root:int too big to convert
Traceback (most recent call last):
  File "/Users/personal/Documents/work/overlay/src/overlay-risk/scripts/influx_metrics.py", line 215, in main
    twaps = get_twaps(pcs, q, params)
  File "/Users/personal/Documents/work/overlay/src/overlay-risk/scripts/influx_metrics.py", line 141, in get_twaps
    return [ get_twap(pc, q, p) for pc in pcs ]
  File "/Users/personal/Documents/work/overlay/src/overlay-risk/scripts/influx_metrics.py", line 141, in <listcomp>
    return [ get_twap(pc, q, p) for pc in pcs ]
  File "/Users/personal/Documents/work/overlay/src/overlay-risk/scripts/influx_metrics.py", line 118, in get_twap
    twaps = compute_amount_out(twap_112, q['amount_in'])
  File "/Users/personal/Documents/work/overlay/src/overlay-risk/scripts/influx_metrics.py", line 99, in compute_amount_out
    return rshift(twap_112)
  File "/Users/personal/Library/Caches/pypoetry/virtualenvs/overlay-risk-xuQRHaNF-py3.7/lib/python3.7/site-packages/numpy/lib/function_base.py", line 2113, in __call__
    return self._vectorize_call(func=func, args=vargs)
  File "/Users/personal/Library/Caches/pypoetry/virtualenvs/overlay-risk-xuQRHaNF-py3.7/lib/python3.7/site-packages/numpy/lib/function_base.py", line 2200, in _vectorize_call
    res = array(outputs, copy=False, subok=True, dtype=otypes[0])
OverflowError: int too big to convert

Seems potentially caused by rshift() implementation, but need to investigate further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant