sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

AttributeError: 'property' object has no attribute 'expandtabs'

Open cddouma-arm opened this issue 5 years ago • 4 comments

Describe the bug

Since 4.3.0 we see the following while reading the project sources:

[2021-11-11T09:54:58.565Z] Exception occurred: [2021-11-11T09:54:58.565Z] File "<BASE>/venv/lib/python3.7/site-packages/sphinx/util/docstrings.py", line 75, in prepare_docstring [2021-11-11T09:54:58.565Z] lines = s.expandtabs(tabsize).splitlines() [2021-11-11T09:54:58.565Z] AttributeError: 'property' object has no attribute 'expandtabs'

Log attached. version 4.2.0 works fine.

sphinx-err.log

How to Reproduce

I hope the log makes it easy enough to spot the error in the source. If not, let me know and I'll try to make a reproducer that I can share.

Expected behavior

No response

Your project

Screenshots

No response

OS

Linux

Python version

3.7.5

Sphinx version

4.3.0

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

cddouma-arm avatar Nov 12 '21 10:11 cddouma-arm

I got AttributeError: 'member_descriptor' object has no attribute 'expandtabs'

Traceback (most recent call last):
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\cmd\build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\application.py", line 344, in build
    self.builder.build_update()
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\builders\__init__.py", line 296, in build_update
    len(to_build))
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\builders\__init__.py", line 308, in build
    updated_docnames = set(self.read())
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\builders\__init__.py", line 415, in read
    self._read_serial(docnames)
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\builders\__init__.py", line 436, in _read_serial
    self.read_doc(docname)
  File "C:\Miniconda\envs\fridgemonitor\lib\site-packages\sphinx\builders\__init__.py", line 476, in read_doc
Environment:
Jinja2-3.0.3 
MarkupSafe-2.0.1 
Pygments-2.10.0 
Send2Trash-1.8.0 
Sphinx-4.3.0 
alabaster-0.7.12 
argcomplete-1.12.3 
argon2-cffi-21.1.0 
babel-2.9.1 
backcall-0.2.0 
bleach-4.1.0 
debugpy-1.5.1 
decorator-5.1.0 
defusedxml-0.7.1 
docutils-0.17.1 
entrypoints-0.3 
imagesize-1.3.0 
importlib-resources-5.4.0 
ipykernel-6.5.1 
ipython-7.29.0 
ipython-genutils-0.2.0 
ipywidgets-7.6.5 
jedi-0.18.1
 jsonpointer-2.2 
jsonschema-4.2.1 
jupyter-1.0.0 
jupyter-client-7.1.0 
jupyter-console-6.4.0 
jupyter-core-4.9.1 
jupyterlab-pygments-0.1.2
 jupyterlab-widgets-1.0.2 
matplotlib-inline-0.1.3 
mistune-0.8.4 
nbclient-0.5.9 
nbconvert-6.3.0 
nbformat-5.1.3 
nbsphinx-0.8.7 
nest-asyncio-1.5.1 
notebook-6.4.6 
pandocfilters-1.5.0 
parso-0.8.2 
pickleshare-0.7.5 
prometheus-client-0.12.0 
prompt-toolkit-3.0.22 
pyrsistent-0.18.0 
pywinpty-1.1.6 
pyyaml-6.0 
pyzmq-22.3.0 
qtconsole-5.2.1 
qtpy-1.11.2 
snowballstemmer-2.2.0 
sphinx-jsonschema-1.17.1 
sphinx-rtd-theme-1.0.0 
sphinxcontrib-applehelp-1.0.2 
sphinxcontrib-devhelp-1.0.2 
sphinxcontrib-htmlhelp-2.0.0 
sphinxcontrib-jsmath-1.0.1 
sphinxcontrib-qthelp-1.0.3 
sphinxcontrib-serializinghtml-1.1.5 
terminado-0.12.1 
testpath-0.5.0
 tornado-6.1 
traitlets-5.1.1 
wcwidth-0.2.5 
webencodings-0.5.1 
widgetsnbextension-3.5.2

astafan8 avatar Nov 25 '21 12:11 astafan8

Sorry for the inconvenience. This is already reported as #9879. It will be resolved in the next release v4.3.1 soon. Thanks,

tk0miya avatar Nov 25 '21 17:11 tk0miya

Sorry for the inconvenience. This is already reported as #9879. It will be resolved in the next release v4.3.1 soon. Thanks,

Thanks for the update 👍 Out of curiosity, I raised this 9 days before #9879 what made this bug hang around while the other was picked-up? Hoping to get better at reporting defects

cddouma-arm avatar Nov 25 '21 17:11 cddouma-arm

Sorry for the late response. Simply, I found your report just after #9879.

tk0miya avatar Nov 25 '21 18:11 tk0miya