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: 'NoneType' object is not subscriptable

See original GitHub issue

After setting up the API and connecting to the Binance account the following message appears:

Traceback (most recent call last): File "tradoge.py", line 382, in <module> main() File "tradoge.py", line 297, in main menu(new_config, client) File "tradoge.py", line 117, in menu doge_balance = client.get_asset_balance(asset='DOGE')['free'] TypeError: 'NoneType' object is not subscriptable

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bp-santoscommented, Feb 19, 2021

The program is finally working. The problem was not in your code but simply because I did not have any currency in my Binance account. I will follow closely your good work! Cheers

1reaction
gschurckcommented, Feb 17, 2021

Normally in the menu you can choose your configuration and it writes in file. But if there is an error in menu it’s complicated. Try with to print client.get_asset_balance(asset='DOGE') without ['free']

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'NoneType' object is not subscriptable
NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return...
Read more >
Python Math - TypeError: 'NoneType' object is not subscriptable
The reason that lista gets set to None is because the return value of list.sort() is None ... it does not return a...
Read more >
[Solved] TypeError: 'NoneType' Object is Not Subscriptable
The error, NoneType object is not subscriptable, means that you were trying to subscript a NoneType object. This resulted in a type error....
Read more >
TypeError: 'NoneType' object is not subscriptable in Python
The Python "TypeError: 'NoneType' object is not subscriptable" occurs when we try to access a None value at a specific index. To solve...
Read more >
Python TypeError: 'NoneType' object is not subscriptable
The “TypeError: 'NoneType' object is not subscriptable” error is common if you assign the result of a built-in list method like sort() ,...
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