AzulGarza / covidmx

Python API to get information about COVID-19 in México.
MIT License
19 stars 7 forks source link

unexpected keyword argument 'return_catalogo' / 'return_descripcion' #2

Closed hyances closed 4 years ago

hyances commented 4 years ago

Hi,

when I run covid_dge_data, catalogo_data = CovidMX(return_catalogo=True).get_data() get:

`Traceback (most recent call last)

in () 3 covid_dge_data = CovidMX().get_data() 4 raw_dge_data = CovidMX(clean=False).get_data() ----> 5 covid_dge_data, catalogo_data = CovidMX(return_catalogo=True).get_data() 6 covid_dge_data, descripcion_data = CovidMX(return_descripcion=True).get_data() 7 covid_dge_data, catalogo_data, descripcion_data = CovidMX(return_catalogo=True, return_descripcion=True).get_data() /usr/local/lib/python3.6/dist-packages/covidmx/covidmx.py in CovidMX(source, **kwargs) 27 28 if source == "Serendipia": ---> 29 return Serendipia(**kwargs) TypeError: __init__() got an unexpected keyword argument 'return_catalogo'` and `covid_dge_data, descripcion_data = CovidMX(return_descripcion=True).get_data()` get: `Traceback (most recent call last) in () 4 #raw_dge_data = CovidMX(clean=False).get_data() 5 #covid_dge_data, catalogo_data = CovidMX(return_catalogo=True).get_data() ----> 6 covid_dge_data, descripcion_data = CovidMX(return_descripcion=True).get_data() 7 #covid_dge_data, catalogo_data, descripcion_data = CovidMX(return_catalogo=True, return_descripcion=True).get_data() /usr/local/lib/python3.6/dist-packages/covidmx/covidmx.py in CovidMX(source, **kwargs) 27 28 if source == "Serendipia": ---> 29 return Serendipia(**kwargs) TypeError: __init__() got an unexpected keyword argument 'return_descripcion'` By the way, Unidecode package is required, so could be usefull to add this line to install instructions: `pip install unidecode`
AzulGarza commented 4 years ago

Hi!

Try using the lastest version of the package, for the first version only one source was considered 'Serendipia' and this was the default version. For the latest version the default source is Dirección General de Epidemiología and those arguments should work.

pip uninstall covidmx
pip install covidmx

Thanks I'll include unicode.

hyances commented 4 years ago

OK, the point is that Google Colab use Python 3.6.9, so an old version is installed instead of last one (0.2.1). Is not possible to upgrade Colab (and I prefer to mantain OS version in my local enviroment), so ¿is strictly neccessary use 3.7? Maybe using a lower version makes it more easy & widely adopted.

ERROR: Package 'covidmx' requires a different Python: 3.6.9 not in '>=3.7'`

AzulGarza commented 4 years ago

Thank you for your feedback! I've released a new version of the package (0.2.3) that works with python3.5+. Please let me know if you have any issues with this version. Thanks!