Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 03:32:00 +0000



Post From: DTC Decode error on one message only using same decode function. Google protocol buffers.

[2018-04-19 05:39:46]
enemyspy - Posts: 304
Ok just note that there was an original of this post but I figured nobody read it yet. So I deleted and re-did it with better information on further testing. In short only 4 char symbols work see details below:

So ABCD.GDAX or any 4 char symbol works:
Hex: \x12\x00\xfa\x01\x08\x01\x12\x04ABCD\x1a\x04GDAX\x14\x00e\x00\x08\x01\x10\x01\x1a\x04ABCD"\x04GDAX

However on the first time the python socket server accepts a connection google protobuf posts the following warning on decode below:
/var/www/FlaskApp/FlaskApp/dtc/dtcProtocol.py:122: RuntimeWarning: Unexpected end-group tag: Not all data was converted
request.ParseFromString(msg)
This still seems to decode and has all the info necessary to send a response. If you close the connection client side and reopen it without closing the server it does not continue to trigger the warning. I find this interesting but that is not a sierra chart problem as the hex is identical.

The problem is as soon as you enter more than 4 chars for the symbol it causes a full exception and crashes the server with the original error I posted:
google.protobuf.message.DecodeError: Error parsing message
The symbol for this:
RDTTB.OKEX
hex: \x13\x00\xfa\x01\x08\x03\x12\x05RDTTB\x1a\x04OKEX\x15\x00e\x00\x08\x01\x10\x03\x1a\x05RDTTB"\x04OKEX

ABCD with no exchange also causes a full google protobuf exception:
hex: \x19\x00\xfa\x01\x08\x01\x12\x04ABCD\x1a\x0bequities.us\x1b\x00e\x00\x08\x01\x10\x01\x1a\x04ABCD"\x0bequities.us
Date Time Of Last Edit: 2018-04-19 07:01:16