AttributeError: 'NoneType' object has no attribute 'total_seconds'

Hello,

i have this error when I try to run my streamlit app:

AttributeError: 'NoneType' object has no attribute 'total_seconds'

\appdata\local\programs\python\python38\lib\site-packages\streamlit\script_runner.py", line 337, in _run_script
    exec(code, module.__dict__)
\finance2.py", line 63, in <module>
    st.write(stock_df)
\appdata\local\programs\python\python38\lib\site-packages\streamlit\elements\write.py", line 181, in write
    self.dg.dataframe(arg)
\appdata\local\programs\python\python38\lib\site-packages\streamlit\elements\data_frame.py", line 85, in dataframe
    marshall_data_frame(data, data_frame_proto)
\appdata\local\programs\python\python38\lib\site-packages\streamlit\elements\data_frame.py", line 147, in marshall_data_frame
    _marshall_index(df.index, proto_df.index)
\appdata\local\programs\python\python38\lib\site-packages\streamlit\elements\data_frame.py", line 348, in _marshall_index
    pandas_index = pandas_index.tz_localize(current_zone)
\appdata\local\programs\python\python38\lib\site-packages\pandas\core\indexes\datetimes.py", line 250, in tz_localize
    arr = self._data.tz_localize(tz, ambiguous, nonexistent)
\appdata\local\programs\python\python38\lib\site-packages\pandas\core\arrays\datetimes.py", line 983, in tz_localize
    new_dates = tzconversion.tz_localize_to_utc(
File "pandas\_libs\tslibs\tzconversion.pyx", line 175, in pandas._libs.tslibs.tzconversion.tz_localize_to_utc
File "pandas\_libs\tslibs\timezones.pyx", line 246, in pandas._libs.tslibs.timezones.get_dst_info

Can anyone help me?

Thanks in advance.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.