Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to import weather dataset if there is no missing values in the dataset #338

Closed
jnsebgosselin opened this issue Oct 2, 2020 · 0 comments · Fixed by #339
Closed

Fail to import weather dataset if there is no missing values in the dataset #338

jnsebgosselin opened this issue Oct 2, 2020 · 0 comments · Fixed by #339

Comments

@jnsebgosselin
Copy link
Owner

If there is non nan value in the weather dataset, the following error occurs :

Traceback (most recent call last):

  File "C:\Users\User\gwhat\gwhat\meteo\tests\test_read_weather_data.py", line 71, in <module>
    wxdset = WXDataFrame(fmeteo)

  File "C:\Users\User\gwhat\gwhat\meteo\weather_reader.py", line 198, in __init__
    self.__load_dataset__(filename)

  File "C:\Users\User\gwhat\gwhat\meteo\weather_reader.py", line 218, in __load_dataset__
    self.metadata, self.data = read_weather_datafile(filename)

  File "C:\Users\User\gwhat\gwhat\meteo\weather_reader.py", line 394, in read_weather_datafile
    data = np.char.strip(data, ' ')

  File "<__array_function__ internals>", line 6, in strip

  File "C:\Anaconda3\envs\python37\lib\site-packages\numpy\core\defchararray.py", line 1549, in strip
    return _vec_string(a_arr, a_arr.dtype, 'strip', _clean_args(chars))

TypeError: string operation on non-string array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant