devcartel / pyrfa

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.
http://devcartel.com/pyrfa
MIT License
50 stars 15 forks source link

OverflowError: bad numeric conversion: positive overflow in dispatchEventQueue #33

Open khanalesb opened 6 years ago

khanalesb commented 6 years ago

Try to request .SSEA

File "/export/scratch/devel/FlaskRFA/src/service.py", line 15, in procResponse for u in p.dispatchEventQueue(): OverflowError: bad numeric conversion: positive overflow 127.0.0.1 - - [15/Sep/2017 10:33:13] "GET /?ric=.SSEA HTTP/1.1" 500 -

Everything else seems to work... I'm using Flask, python 2.7.3 and pyrfa 8.2.1

wiwat-tharateeraparb commented 6 years ago

It may be safer to dispatch updates just like consumer.py. Second, it is possible that you didn't dispatch events fast enough. If you can send pyrfa.log to support@devcartel.com, I will take a look.

khanalesb commented 6 years ago

Looks like I didn't explain myself well enough: application works for everything except for this symbol: .SSEA Timeout in dispatch doesn't change a thing. Overflow - it is one item request (snapshot) - not even subscription.

khanalesb commented 6 years ago

Log: [MarketPriceHandler::processResponse] MarketPrice Refresh: .SSEA.hEDD [2017-10-06 09:42:54,218] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function return cors_after_request(app.make_response(f(*args, kwargs))) File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/export/scratch/software/python/flaskrfa/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](req.view_args) File "src/service.py", line 55, in home res = fullRequest(p, ric) File "src/service.py", line 26, in fullRequest result = procResponse(p) File "src/service.py", line 15, in procResponse for u in p.dispatchEventQueue(): OverflowError: bad numeric conversion: positive overflow

wiwat-tharateeraparb commented 6 years ago

Looks like it could be a data decoding issue for this .SSEA RIC. We don't have this symbol in our lab. Are you able to turn on traceMsg in pyrfa.cfg, e.g.:

\Connections\Connection_RSSL1\traceMsg = true
\Connections\Connection_RSSL1\traceMsgFileName = "./out.txt"

This will enable PyRFA to log incoming data into a file. Then we can investigate which data format that causes this issue.

yi-cheng-chen-taiwan commented 5 years ago

I have the same issue of this, the ric is "/600085.SS". The platform is docker offical python 3.7.3 image and pyrfa 8.5.3.

But there is one strange thing. If the develop platform is windows. Everything is ok. If the platform is linux. It will throw overflow exception.

The others rics are OK, except the rics of china.

Thanks

wiwat-tharateeraparb commented 5 years ago

Hi, we believe it could be some decoding issue. Can you try simple consumer app just to get this RIC and set \pyrfa\debug = true just to see when the exception occurs?

Unfortunately, we don't have access to this data in our lab.

yi-cheng-chen-taiwan commented 5 years ago

issue.txt

Please reference the log file, i have hided the personal informaion. updates = p.dispatchEventQueue(100) OverflowError: bad numeric conversion: positive overflow

Thanks

yi-cheng-chen-taiwan commented 5 years ago

Dear Wiwat: Is there any plan of this issue? What kind of information that i can collect? Thank you.

wiwat-tharateeraparb commented 5 years ago

@Chen-Yi-Cheng is it possible for us to access your IDN_SELECTFEED so we can consume .SS symbols? If so, please contact our support@devcartel.com for access information.