question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARNING: error while formatting signature: Handler <function process_signature at 0x00000280E14DCC10> for event 'autodoc-process-signature' threw an exception

See original GitHub issue

Hello,

i’m currently trying to use sphinx-autodoc-typehints to create a nice documentation for my project pyage (https://github.com/Timtam/pyage). I do have an issue however. When i’m annotating a method like this:

    def quit(self) -> None:
        """
        This method will tell the game loop to quit as soon as possible, releasing all resources in the process.
    
        Parameters
        ----------


        Returns
        -------
        :obj:`None`

        """

sphinx-autodoc-typehints will fail with an indescriptive error when processing the signature of that method: WARNING: error while formatting signature for pyage.app.App.quit: Handler <function process_signature at 0x00000280E14DCC10> for event ‘autodoc-process-signature’ threw an exception (exception: ‘quit’)

I’ve configured my sphinx-autodoc-typehints as follows:

extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.intersphinx",
    "sphinx.ext.todo",
    "sphinx.ext.viewcode",
    "sphinx.ext.napoleon",
    "sphinx_autodoc_typehints",
]

napoleon_use_param = True

Do you have any idea of what might cause this issue, or how I can help you digging deeper into the issue?

I’m running Python 3.8.2 with sphinx 3.3.1 and sphinx-autodoc-typehints 1.11.1. Thanks.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Paebbelscommented, Jan 8, 2022

I think a PR from me side is out of scope. I’m not a Sphinx / Sphinx extension developer and I have no knowledge about this particular extension nor why a meta class should break the code or cause such a hard error.

In addition, I tried multiple time to debug Sphinx code, but it’s just a nightmare how it’s programmed and documented. It’s still a nice tools and it works, but fixing problems in Sphinx is a nightmare as it has no clear and documented software architecture.

Sorry.


If you like, I can try to make a minimal example and also try to narrow it down.

0reactions
Paebbelscommented, Jan 8, 2022

@gaborbernat I know this situation as I’m also involved in >40 projects - in many of them as maintainer 😃

Anyhow, I’ll provide a minimal reproducer for investigations. Since a while I have it on my todo list. I just accidently found this issues. Until a few days ago, I though I’m alone with this problem and it might be due to other extensions or special code I’m using. So with this open issue, I have a first idea how to narrow it down.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sphinx 4.3 raises an 'autodoc-before-process-signature' error ...
WARNING : error while formatting arguments for example_package.example_partial: Handler <function update_defvalue at 0x102f24310> for event ...
Read more >
python-sphinx - Display only function signature with autodoc?
I am wondering if there is a way of configuring autodoc to include and format only the signature, without the rest of the...
Read more >
sphinx-autodoc-typehints - Bountysource
WARNING : error while formatting signature: Handler <function process_signature at 0x00000280E14DCC10> for event 'autodoc-process-signature' threw an ...
Read more >
Create and add an email signature in Outlook
Under Email signature, type your signature and use the available formatting options to change its appearance. Note: You can have only one signature...
Read more >
NetSuite Applications Suite - Customizing Email Signatures ...
... Updating a Permission on Custom Roles · Mass Updating the Role Assigned to Customers ... Event CSV File Examples · Common Errors...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found