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

symbol case KeyError on 2nd sym loaded #435

Closed
goodboy opened this issue Dec 20, 2022 · 0 comments
Closed

symbol case KeyError on 2nd sym loaded #435

goodboy opened this issue Dec 20, 2022 · 0 comments
Labels
broker-backend `brokerd`/`datad` related backend tech bug guille broke it prolly data-layer real-time and historical data processing and storage

Comments

@goodboy
Copy link
Contributor

goodboy commented Dec 20, 2022

I've noticed this now both with kraken and binance backends. Error is something along the lines of:

Traceback (most recent call last):
  File "/home/goodboy/repos/tractor/tractor/_runtime.py", line 196, in _invoke
    res = await coro
  File "/home/goodboy/repos/piker/piker/data/feed.py", line 1140, in open_feed_bus
    await bus.nursery.start(
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/trio/_core/_run.py", line 1085, in start
    async with open_nursery() as old_nursery:
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/trio/_core/_run.py", line 850, in __aexit__
    raise combined_error_from_nursery
  File "/home/goodboy/repos/piker/piker/data/feed.py", line 966, in allocate_persistent_feed
    msg = init_msg[symstr]
KeyError: 'LTCEUR'

[4] > /home/goodboy/repos/piker/piker/data/feed.py(966)allocate_persistent_feed()
-> msg = init_msg[symstr]

Explanation

seems to be either of:

  • pikerd is running, connect a chart to a kraken with a symbol specc-ed on the CLI (say xbteur.kraken), connect another separate chart program to a binance sym (say btcusdt.binance), in the first chart try to search and load another kraken feed.
  • the same setup but spawn the binance-only chart first

I can't tell yet if this is cex specific or not but does seem to be a discrepancy between the input symbol key from the search results to the lookup by the feed machinery to get sym info:

LTCEUR -> -> init_msg: dict contains lower case version of key.


possible solution(s)

probably best one is keeping lowercase symbol keys throughout the data feed stuff and making sure that binance adheres to this in particular..

@goodboy goodboy added bug guille broke it prolly data-layer real-time and historical data processing and storage broker-backend `brokerd`/`datad` related backend tech labels Dec 20, 2022
goodboy added a commit that referenced this issue Dec 22, 2022
goodboy added a commit that referenced this issue Jan 9, 2023
goodboy added a commit that referenced this issue Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broker-backend `brokerd`/`datad` related backend tech bug guille broke it prolly data-layer real-time and historical data processing and storage
Projects
None yet
Development

No branches or pull requests

1 participant