jaredwo / obsio

obsio is a Python package that provides a consistent generic interface for accessing weather and climate observations from multiple different data providers.
GNU General Public License v3.0
16 stars 7 forks source link

Exception thrown running example code for NRCS #2

Open tdrobbin opened 5 years ago

tdrobbin commented 5 years ago

Hello! I installed obsio in a new conda environment according to the instructions in the readme, and tried running the NRCS example snipped but got the following exception:

Screen Shot 2019-06-15 at 12 08 48 AM

I tried making the following modification at line 631 in /obsio/providers/nrcs.py but, it seems not to be fixing the issue.

#         self._elem_funcs = np.unique(np.array([_ELEM_EXTRACT_FUNCS[a_elem] for
#                                                a_elem in self.elems]))

    self._elem_funcs = np.array([_ELEM_EXTRACT_FUNCS[a_elem] for
                                           a_elem in np.unique(self.elems)])

Any help would be greatly appreciated. Also thank you for your work on a fantastic tool!

brobertspierel commented 5 years ago

I am having the same issue. Thanks for developing this!

jaredwo commented 5 years ago

Thanks for submitting this. Glad to hear that obsio is being used! The package was originally developed ~ 2015 under Python 2 and hasn't received much maintenance except for minor changes to migrate to Python 3. This is likely an overlooked Python 2 vs 3 issue. Python 3 has more strict rules for comparisons. I'll take a look.

jaredwo commented 5 years ago

Fixed, but this reveals another NRCS Python 3 migration issue upstream in suds. Referencing https://github.com/jaredwo/obsio/issues/3 .