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

marketPriceRequest returning integer values for RDMFieldDictionary #55

Open
shashank88 opened this issue Sep 1, 2020 · 1 comment
Open

Comments

@shashank88
Copy link

shashank88 commented Sep 1, 2020

Hi,

We came across a strange issue when using this library. When we try to do a marketPriceRequest and in the response, we get the integer value of the RDMFieldDictionary for most fields. So instead of 'PROD_PERM', we get 1 and so on for all fields in https://raw.githubusercontent.com/devcartel/pyrfa/24ca27ec6e0cb9b1f87a9390f8d219409ccaea9f/pyrfa/RDMFieldDictionary

Sample code:

    p.marketPriceRequest(','.join(rics))
    # Wait for the snapshot to be complete
    start, elapsed = time.time(), 0
    images, completed = OrderedDict(), set()
    while completed != set(rics) and elapsed < timeout:
        logging.debug('Checking for events...')
        for msg in p.dispatchEventQueue(1000):
            if msg:
                if msg['MTYPE'] == 'IMAGE':
                    images[msg['RIC']] = OrderedDict(msg)```

in the msg, we have integers in the keys instead of the fields, and the values are Unknown DataBuffer: (1, 'Unknown DataBuffer')
This is happening for all keys apart from ['RIC', '/VXRT.O'), ('SERVICE', 'EED'), ('MTYPE', 'IMAGE')]) in the msg.

Is there something in the allocation of the string to encode the dictionary values going wrong? Anything I can do to enable some more logging to debug this better. We also have another C++ library imported to by python via pybind, can that cause issues as well?
@wiwat-tharateeraparb
Copy link
Contributor

Looks like PyRFA cannot decode the data using dictionary provided.

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

2 participants