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

TypeError: string indices must be integers #12

Open
Artemis3v opened this issue Mar 6, 2020 · 4 comments
Open

TypeError: string indices must be integers #12

Artemis3v opened this issue Mar 6, 2020 · 4 comments

Comments

@Artemis3v
Copy link

I was using the monitor fine until yesterday, but now its only spitting this error:

Traceback (most recent call last):
  File "/usr/bin/pycoinmon", line 11, in <module>
    load_entry_point('pycoinmon==0.4.8', 'console_scripts', 'pycoinmon')()
  File "/usr/lib/python3.7/site-packages/pycoinmon/main.py", line 7, in main
    pycoinmon.core.PyCoinmon().run()
  File "/usr/lib/python3.7/site-packages/pycoinmon/core.py", line 109, in run
    self.print_values()
  File "/usr/lib/python3.7/site-packages/pycoinmon/core.py", line 91, in print_values
    tabulated_data = process_data(filtered_data, currency=self.args.currency, humanize=self.args.humanize)
  File "/usr/lib/python3.7/site-packages/pycoinmon/common.py", line 74, in process_data
    tab_item.append(item[field])
TypeError: string indices must be integers

And doesn't work anymore...

@RDCH106
Copy link
Owner

RDCH106 commented Mar 11, 2020

Could you provide pycoinmon version and arguments given to pycoinmon command?

You can check pycoinmon version using the following command:

pycoinmon --version

@BrencelJ
Copy link

BrencelJ commented Apr 7, 2020

Hello, I have a similar error message:
Traceback (most recent call last):
File "/home/pi/.local/bin/pycoinmon", line 10, in
sys.exit(main())
File "/home/pi/.local/lib/python2.7/site-packages/pycoinmon/main.py", line 7, in main
pycoinmon.core.PyCoinmon().run()
File "/home/pi/.local/lib/python2.7/site-packages/pycoinmon/core.py", line 109, in run
self.print_values()
File "/home/pi/.local/lib/python2.7/site-packages/pycoinmon/core.py", line 88, in print_values
filtered_data = find_data(response.json(), self.args.symbol)
File "/home/pi/.local/lib/python2.7/site-packages/pycoinmon/common.py", line 85, in find_data
if item['symbol'] in symbols:
TypeError: string indices must be integers

I'm running version 0.4.8.

Could be a problem because I'm running it on RP or with python-2.7?

@RDCH106
Copy link
Owner

RDCH106 commented Apr 7, 2020

@Artemis3v It seems a problem with coinmarketcap API.

Fixing the problem, it will work again. I will check it next days.

@BrencelJ I recommend you migrate to 🐍 Python3 if it is possible.

@RDCH106
Copy link
Owner

RDCH106 commented Apr 15, 2020

Issue detected:

{
   "statusCode":410,
   "error":"Gone",
   "message":"WARNING: This API is now offline. Please switch to the new CoinMarketCap API. (https://pro.coinmarketcap.com/migrate/)"
}

⚠️ As coinmarketcap API is only free with API keys, I going to try to use coincap API.

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

3 participants