-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Docs won't build (Unexpected warning in user_guide/timeseries.rst
)
#56740
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
Comments
This suggests to me you are using two different pythons when you build docs vs when you run in ipython. When you build and install pandas, what python is used? |
@rhshadrach
|
Very odd. I would suggest to try recreating your environment, but from the commands above I believe you've already done that. |
Hi all, I am getting the same issue. Adding pandas/doc/source/user_guide/timeseries.rst Lines 199 to 204 in ec3eddd
solves the issue for me. I'm happy to submit a PR if that's the acceptable solution. Cheers! |
@melissawm - If you run this code on its own (outside building the docs), what's the warning you're seeing? |
Here you go, no warnings:
|
Thanks @melissawm. But this is odd - I don't know what |
This error happens because sphinx selects user locale, so then '%B' format in strftime returns localized month names and pandas' date format inferring with english month names fails. To prevent this error you can restore locale to default in conf.py:
|
Thanks @panda-34 - that explains the trouble we've had reproducing. Will confirm on my end in the next few days, if anyone else would like to do it'd be appreciated as well! |
I'm afraid I get a different error now 😅 I can open another issue to not pollute this one but I can also do some digging myself. I installed using the instructions on the contributing docs:
|
@melissawm - am I correct in saying you see the error in the OP when you don't have the |
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Running
python make.py html
to build the whole documentation, it fails when buildinguser_guide/timeseries.rst
:Then run
python make.py --single user_guide/timeseries.rst
to see details:The UserWarning for
pd.to_datetime(pd.Series(["Jul 31, 2009", "Jan 10, 2010", None]))
seems to be strange because no warning occurs when I directly run this code in ipython. Full traceback in/tmp/sphinx-err-mnsayjoe.log
:Expected Behavior
HTML doc successfully built.
Installed Versions
INSTALLED VERSIONS
commit : b2bca5e
python : 3.11.0.final.0
python-bits : 64
OS : Linux
OS-release : 6.2.0-39-generic
Version : #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.3.0.dev0+46.gb2bca5e965
numpy : 1.26.3
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 68.2.2
pip : 23.3.1
Cython : 3.0.5
pytest : 7.4.4
hypothesis : 6.92.2
sphinx : 7.2.6
blosc : 1.11.1
feather : None
xlsxwriter : 3.1.9
lxml.etree : 5.0.0
html5lib : 1.1
pymysql : 1.4.6
psycopg2 : 2.9.9
jinja2 : 3.1.2
IPython : 8.19.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.2
bottleneck : 1.3.7
dataframe-api-compat : None
fastparquet : 2023.10.1
fsspec : 2023.12.2
gcsfs : 2023.12.2post1
matplotlib : 3.8.2
numba : 0.58.1
numexpr : 2.8.8
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 14.0.2
pyreadstat : 1.2.6
python-calamine : None
pyxlsb : 1.0.10
s3fs : 2023.12.2
scipy : 1.11.4
sqlalchemy : 2.0.25
tables : 3.9.2
tabulate : 0.9.0
xarray : 2023.12.0
xlrd : 2.0.1
zstandard : 0.22.0
tzdata : 2023.4
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: