Closed alanponce closed 4 years ago
Changing the encoding to 'LATIN-1' fixes this issue but i'm unaware if that changes anything relevant inside the information. I haven't seen anything yet but it is a possibility.
I have added the validation for avoiding this issue in the open PR, yes, the latin
encoding solves the issue, but it seems that it is only for some of the csv files, the source is not consistent in the encoding I think.
Thank you! I will prepare the next release considering this change.
Changing the encoding to 'LATIN-1' fixes this issue but i'm unaware if that changes anything relevant inside the information. I haven't seen anything yet but it is a possibility.
How do you change the encoding? I still have this encoding issue with the Dirección General de Epidemiología source.
The version 0.3.0 includes this fix. You can upgrade with pip install --upgrade covidmx
. Let me know if you have any problem.
covid_dge_data = CovidMX().get_data()
data = pd.read_csv(url_data, encoding='UTF-8') 73 except BaseException: ---> 74 raise RuntimeError('Cannot read the data.') 75 76 try:
RuntimeError: Cannot read the data.