Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Issue with coronavirusapi-exporter and grafana-worldmap-panel #1

Open
iamshreeram opened this issue Dec 1, 2020 · 3 comments
Open

Comments

@iamshreeram
Copy link

2 issues -

  1. coronavirusapi-exporter - getTimeSeries API is failing. I believe this needs a API token to be sent. Also, Since the exception is not handled while making data = pandas.read_csv(url), Python app isn't starting. If we can add this piece of code, inside a try block, that might get the app started.
  2. Download of grafana-worldmap-panel plugin is failing .

Container logs :

coronavirusapi-redismod | 1:M 01 Dec 2020 20:25:05.804 * Ready to accept connections
coronavirusapi-exporter | http://coronavirusapi.com/getTimeSeries/ID
coronavirusapi-grafana | installing redis-datasource @ 1.2.1
coronavirusapi-grafana | from: https://grafana.com/api/plugins/redis-datasource/versions/1.2.1/download
coronavirusapi-grafana | into: /var/lib/grafana/plugins
coronavirusapi-grafana |
coronavirusapi-exporter | Traceback (most recent call last):
coronavirusapi-exporter |   File "coronavirusapi_exporter.py", line 69, in <module>
coronavirusapi-exporter |     data = pandas.read_csv(url)
coronavirusapi-exporter |   File "/usr/local/lib/python3.8/site-packages/pandas/io/parsers.py", line 688, in read_csv
coronavirusapi-exporter |     return _read(filepath_or_buffer, kwds)
coronavirusapi-exporter |   File "/usr/local/lib/python3.8/site-packages/pandas/io/parsers.py", line 460, in _read
coronavirusapi-exporter |     data = parser.read(nrows)
coronavirusapi-exporter |   File "/usr/local/lib/python3.8/site-packages/pandas/io/parsers.py", line 1198, in read
coronavirusapi-exporter |     ret = self._engine.read(nrows)
coronavirusapi-exporter |   File "/usr/local/lib/python3.8/site-packages/pandas/io/parsers.py", line 2157, in read
coronavirusapi-exporter |     data = self._reader.read(nrows)
coronavirusapi-exporter |   File "pandas/_libs/parsers.pyx", line 847, in pandas._libs.parsers.TextReader.read
coronavirusapi-exporter |   File "pandas/_libs/parsers.pyx", line 862, in pandas._libs.parsers.TextReader._read_low_memory
coronavirusapi-exporter |   File "pandas/_libs/parsers.pyx", line 918, in pandas._libs.parsers.TextReader._read_rows
coronavirusapi-exporter |   File "pandas/_libs/parsers.pyx", line 905, in pandas._libs.parsers.TextReader._tokenize_rows
coronavirusapi-exporter |   File "pandas/_libs/parsers.pyx", line 2042, in pandas._libs.parsers.raise_parser_error
coronavirusapi-exporter | pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2
coronavirusapi-exporter |
coronavirusapi-exporter exited with code 1
coronavirusapi-grafana | ✔ Installed redis-datasource successfully
coronavirusapi-grafana |
coronavirusapi-grafana | Restart grafana after installing plugins . <service grafana-server restart>
coronavirusapi-grafana |
coronavirusapi-grafana | installing grafana-worldmap-panel @ 0.3.2
coronavirusapi-grafana | from: https://grafana.com/api/plugins/grafana-worldmap-panel/versions/0.3.2/download
coronavirusapi-grafana | into: /var/lib/grafana/plugins
coronavirusapi-grafana |
coronavirusapi-grafana | Error: ✗ failed to download plugin archive: Failed to send request: Get "https://grafana.com/api/plugins/grafana-worldmap-panel/versions/0.3.2/download": net/http: TLS handshake timeout
coronavirusapi-grafana exited with code 1

Solution:

  1. Enable an option to send token for getTimeSeries API. We can export the token as ENV variable and read it in python.
  2. Add the data = pandas.read_csv(url) inside a try-catch block.
  3. Find the reason for grafana-worldmap-panel plugin error
  4. Document all these steps in README.md

cc: @mikhailredis

@alex6058
Copy link
Contributor

alex6058 commented Dec 1, 2020

Hello Sheeram,

Thank you for your feedback. https://coronavirusapi.com/ gave free access to their data, but unfortunately, they recently closed it and made it available only for registered first-responders (https://coronavirusapi.com/users/sign_in). Therefore this project doesn't make sense anymore. Currently, I'm considering any other free source of coronavirus statistics, if you know some, please let me know. If can re-start this project, I then will implement your suggestions, which are very useful, thank you!

@iamshreeram
Copy link
Author

Hi @alex6058 , Thanks for quick response.

Sure. I can look for some sources. Also, I have few other features request & thought process. If you can enable a public discussion in this org, It would be helpful.

@mikhail-vl
Copy link
Contributor

@iamshreeram I am sorry for the delay. I added the Discussions section to Redis Data Source, Redis Application and CoronaVirus Map. Please let us know your ideas!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants