binarynightowl / covid19_python

A fast, powerful, and flexible way to get up to date COVID-19 data for any major city, state, country, and total world wide data, with just one line of code
https://pypi.org/project/covid19-data/
MIT License
9 stars 0 forks source link

[BUG] Can't get covid cases for USA #13

Closed Mayank-1234-cmd closed 3 years ago

Mayank-1234-cmd commented 3 years ago

Describe the bug Running covid19_data.dataByName("USA").confirmed (replace USA with United States of America, United States, etc.. and it just returns keyError) To Reproduce Steps to reproduce the behavior:

  1. Run import covid19_data; covid19_data.dataByName("USA").confirmed;
  2. See error

Expected behavior Give confirmed cases.

Screenshots If applicable, add screenshots to help explain your problem. https://pasteboard.co/JOw7y82.png Desktop (please complete the following information): Ubuntu 18.04 Bionic Additional context Add any other context about the problem here.

Mayank-1234-cmd commented 3 years ago

My program returned this:

An keyerror occured while running:'ANGUILLA'
An keyerror occured while running:'NETHERLANDSANTILLES'
An keyerror occured while running:'ANTARCTICA'
An keyerror occured while running:'ARUBA'
An keyerror occured while running:'BERMUDA'
An keyerror occured while running:'BOUVETISLAND'
An keyerror occured while running:'COCOS[KEELING]ISLANDS'
An keyerror occured while running:'CONGO[DRC]'
An keyerror occured while running:'CONGO[REPUBLIC]'
An keyerror occured while running:"CÔTED'IVOIRE"
An keyerror occured while running:'COOKISLANDS'
An keyerror occured while running:'CAPEVERDE'
An keyerror occured while running:'CHRISTMASISLAND'
An keyerror occured while running:'CZECHREPUBLIC'
An keyerror occured while running:'FALKLANDISLANDS[ISLASMALVINAS]'
An keyerror occured while running:'FAROEISLANDS'
An keyerror occured while running:'FRENCHGUIANA'
An keyerror occured while running:'GUERNSEY'
An keyerror occured while running:'GIBRALTAR'
An keyerror occured while running:'GREENLAND'
An keyerror occured while running:'GUADELOUPE'
An keyerror occured while running:'SOUTHGEORGIAANDTHESOUTHSANDWICHISLANDS'
An keyerror occured while running:'GUINEA-BISSAU'
An keyerror occured while running:'GAZASTRIP'
An keyerror occured while running:'HONGKONG'
An keyerror occured while running:'HEARDISLANDANDMCDONALDISLANDS'
An keyerror occured while running:'ISLEOFMAN'
An keyerror occured while running:'BRITISHINDIANOCEANTERRITORY'
An keyerror occured while running:'JERSEY'
An keyerror occured while running:'KIRIBATI'
An keyerror occured while running:'NORTHKOREA'
An keyerror occured while running:'SOUTHKOREA'
An keyerror occured while running:'CAYMANISLANDS'
An keyerror occured while running:'MACEDONIA[FYROM]'
Mayank-1234-cmd commented 3 years ago

hello?

binarynightowl commented 3 years ago

Hello, the US works fine. Try this line covid19_data.dataByName("US").confirmed

Also please, remember this is a professional forum, its not my job to fix the issue instantly. I am a devloper that has a lot going on, and I cannot fix the issues instantly. As for all of the other Key errors, those are all unsupported areas that are not provided by my API. This is because those data points are not provided to me by the data source. If you read the documentation on the readme of this repo or the examples section, you will see the proper way to get the US data. Also, I reccomend using the new method of getting the data which is the object parameter style. Is there anything else I can do for you?

Once again please do not bump isssues, as I cannot always respond right away, and I have been dealing with power outages in my area all day. Thanks for your consideration, Taylor Dettling

Mayank-1234-cmd commented 3 years ago

thanks!