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

Windows Timezone Issue #10

Open
guswelter opened this issue Mar 2, 2021 · 0 comments
Open

Windows Timezone Issue #10

guswelter opened this issue Mar 2, 2021 · 0 comments
Assignees

Comments

@guswelter
Copy link
Contributor

(email thread provided separately)

On Windows, a user is running into this exception while creating a sample file using csv2audata:

(testing) C:\Users\ii699\Documents\Kirubel\UMBC\IndependentStudy\Scratch>python -m audata.bin.csv2audata myData.csv
Creating myData.h5
  adding myData
    Parsing time offset column: time
C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\dateutil\parser\_parser.py:1213: UnknownTimezoneWarning: tzname EST identified but not understood.  Pass `tzinfos` argument in order to correctly return a timezone-aware datetime.  In a future version, this will raise an exception.
  warnings.warn("tzname {tzname} identified but not understood.  "
    Found int64 column: value
Traceback (most recent call last):
  File "C:\Users\ii699\miniconda3\envs\testing\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\ii699\miniconda3\envs\testing\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\bin\csv2audata.py", line 119, in <module>
    main()
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\bin\csv2audata.py", line 114, in main
    _walk(au_file, args.path)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\bin\csv2audata.py", line 77, in _walk
    _addcsv(au_file, name, path)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\bin\csv2audata.py", line 60, in _addcsv
    au_file[name] = data
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\group.py", line 118, in __setitem__
    Dataset.new(self, key, value, overwrite=overwrite, **kwargs)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\dataset.py", line 65, in new
    return cls.__new_from_dataframe(au_parent, name, value)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\dataset.py", line 121, in __new_from_dataframe
    meta, recs = utils.audata_from_df(
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\audata\_utils.py", line 72, in audata_from_df
    data[col] = (data[col].dt.tz_convert(time_ref.tzinfo) -
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\pandas\core\accessor.py", line 92, in f
    return self._delegate_method(name, *args, **kwargs)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\pandas\core\indexes\accessors.py", line 109, in _delegate_method
    result = method(*args, **kwargs)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\pandas\core\indexes\datetimes.py", line 243, in tz_convert
    arr = self._data.tz_convert(tz)
  File "C:\Users\ii699\miniconda3\envs\testing\lib\site-packages\pandas\core\arrays\datetimes.py", line 814, in tz_convert
    raise TypeError(
TypeError: Cannot convert tz-naive timestamps, use tz_localize to localize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants