numpy / numpy/numpydoc

version 1.1.0 failing at _clean_text_signature with TypeError: expected string or bytes-like object

Open
#276 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: Bug fix
Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

Version 1.0 has been ok. Possible related to #221

The method _clean_text_signature seems to be also receiving classes and not being able to handle them.

Added few print to debug. These are the result:

    print(sig)  # pytest.importorskip.__text_signature__
    print(type(sig))  # <class 'pytest.importorskip.__text_signature__'>
    print(start_pattern.search(sig))  # CRASH: TypeError

See the failing job: https://gitlab.com/secml/secml/-/jobs/622655243

Still investigating any possible source of the problem from our side.

Installed Sphinx modules:

    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.viewcode',
    'sphinx.ext.intersphinx',
    'sphinx.ext.imgmath',
    'matplotlib.sphinxext.plot_directive',
    'numpydoc',
    'm2r',
    'nbsphinx',
    'nbsphinx_link'

Installed libraries:

numpydoc==1.1.0
Sphinx==2.4.4
sphinx-rtd-theme==0.5.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the _clean_text_signature entry point and reproduce the failure with the reported Sphinx 2.4.4 and numpydoc 1.1.0 environment. Trace why a class reaches start_pattern.search(sig), then verify that the failing documentation build no longer raises the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.