Skip to content
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

Fix a fatal error preventing documentation generation in some cases #302

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

mn3mos
Copy link
Contributor

@mn3mos mn3mos commented Jan 18, 2021

Got a fatal exception on this line, which prevented the generation of the documentation.

The problem is that some variable is initialized in a try bloc but still used out of it afterwards.
If the getattr fails line 682 - which was my problem - then the variable is used without being initialized, which lead to fatal error.

@kernc
Copy link
Member

kernc commented Jan 18, 2021

If the getattr fails line 682 - which was my problem - then the variable is used without being initialized

That should be caught by AttributeError or what do you mean variable fails? Can you construct a mwe example that reproduces the issue? This was just recently touched in 9bdb076.

mn3mos and others added 2 commits June 22, 2024 02:08
Got a fatal exception on this line, which prevented the generation of the documentation.

The problem is that some variable is initialized in a try bloc but still used out of it afterwards.
If the getattr fails line 682 - which was my problem - then the variable is used without being initialized, which lead to fatal error.
@kernc kernc merged commit 3bf1cd8 into pdoc3:master Jun 22, 2024
3 checks passed
kernc pushed a commit to johann-petrak/pdoc that referenced this pull request Jun 22, 2024
…ses (pdoc3#302)

* Update __init__.py

Got a fatal exception on this line, which prevented the generation of the documentation.

The problem is that some variable is initialized in a try bloc but still used out of it afterwards.
If the getattr fails line 682 - which was my problem - then the variable is used without being initialized, which lead to fatal error.

* Use `try-else` block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants