pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

Fix a fatal error preventing documentation generation in some cases

Open mn3mos opened this issue 4 years ago • 1 comments

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.

mn3mos avatar Jan 18 '21 16:01 mn3mos

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 https://github.com/pdoc3/pdoc/commit/9bdb076e267b33949fb6ffc906316e8651d5f474.

kernc avatar Jan 18 '21 17:01 kernc