question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError when fetching ticker in Python 3.6

See original GitHub issue

Version 1.4.79, getting a type error when trying to fetch ticker info. Just posting this here in case other people have ran into it, will try and figure out a fix tomorrow when I have some time… First half of the stack trace is my stuff, but it shows the calling method and the exchange/symbol so that might help.

Exception fetching USDT-BTC from bittrex
  File "/home/nathan/sources/coinbot/strategies/apis.py", line 35, in fetch_json
    return lower_key(self.ccxt.fetch_ticker(symbol))
  File "/home/nathan/.virtualenvs/coins/lib/python3.6/site-packages/ccxt/exchanges.py", line 3108, in fetch_ticker
    'market': m['id'],
TypeError: string indices must be integers

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
gnmerrittcommented, Aug 23, 2017

I was on a super old version (ccxt==0.1.63) which for some reason was accepting USDT-BTC but this symbol/id stuff you explained is way better anyway - I was doing the mapping between exchanges myself so I’m glad to upgrade and have you guys do it. Thanks for taking a look!

1reaction
thijstriemstracommented, Aug 22, 2017

why not BTC/XXX or YYY/BTC? It should be a pair of currencies with a slash (a symbol) ))

I know but that’s how to reproduce the traceback 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error on replace() in Python 3.6 - Stack Overflow
Getting error on replace() in Python 3.6 ... result = result.replace("%%%", var1, 1) TypeError: replace() argument 2 must be str, not bytes.
Read more >
Changelog — Python 3.11.1 documentation
TypeError was not raised when using more than one TypeVarTuple , like [*T, *V] in type alias substitutions. gh-90467: Fix asyncio.streams.StreamReaderProtocol ...
Read more >
fix-yahoo-finance 0.1.30 - PyPI
Fetching data for multiple tickers. import fix_yahoo_finance as yf data = yf.download("SPY AAPL", start="2017-01-01", end="2017-04-30").
Read more >
Difficulty installing on Python 3.6 - Support
TypeError : numpy boolean subtract, the - operator, is deprecated, use the bitwise_xor, the ^ operator, or the logical_xor function instead. Ran ...
Read more >
Unhashable type: 'Local Proxy' for Python <= 3.8 : PY-49000
get(type_object) TypeError: unhashable type: 'LocalProxy' Unexpected error, recovered safely. Pycharm 2021.2. Python 3.6. Flask 2.0.1. Solution to change Python ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found