You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importwarningswarnings.simplefilter("error") # causes below line to fail, comment out to succeed without warningimportpandasaspd
Problem description
Enabling warnings.simplefilter("error") causes pandas to raise an error
Traceback (most recent call last):
File "C:/Projects/aereseu/jebob/eu/models/bm.py", line 4, in <module>
import pandas as pd
File "C:\Python36\lib\site-packages\pandas\__init__.py", line 26, in <module>
from pandas._libs import (hashtable as _hashtable,
File "C:\Python36\lib\site-packages\pandas\_libs\__init__.py", line 4, in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
File "pandas\_libs\tslibs\conversion.pxd", line 11, in init pandas._libs.tslib
File "pandas\_libs\tslibs\conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
File "pandas\_libs\tslibs\nattype.pyx", line 14, in init pandas._libs.tslibs.nattype
ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
Running python with the command line option Werror results in the same behaviour.
Expected Output
Pandas should not crash when being imported. This is relevant for my use case where I am doing unit testing with -Werror enabled.
Code Sample, a copy-pastable example if possible
Problem description
Enabling
warnings.simplefilter("error")
causes pandas to raise an errorRunning python with the command line option
Werror
results in the same behaviour.Expected Output
Pandas should not crash when being imported. This is relevant for my use case where I am doing unit testing with
-Werror
enabled.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: