Closed MartinRJDagleish closed 6 months ago
I debugged the pdoc
code base with the flags from above and then stepped throug the doc generation.
There I noticed, that the crash was always happening in a certain module.
I investigated my code further and after some examination, I found that my docstring was wrongly formatted (not according to numpydoc
format).
Error inducing code snippet (shortened):
class Foo:
@classmethod
def ser_and_write_to_file(cls, fit_sett: FitSett, fpath: Path | str) -> None:
"""
Write the serialized representation of the `fit_sett` object to a file specified by `fpath`.
Parameters
----------
fit_sett: FitSett
The object to be serialized and written to the file.
fpath: Path | str
The path to the file where the serialized representation will be written.
Raises
------
OSError: If there is an error while writing to the file.
Returns
-------
None
"""
instead of the correct:
class Foo:
@classmethod
def ser_and_write_to_file(cls, fit_sett: FitSett, fpath: Path | str) -> None:
"""
Write the serialized representation of the `fit_sett` object to a file specified by `fpath`.
Parameters
----------
fit_sett: FitSett
The object to be serialized and written to the file.
fpath: Path | str
The path to the file where the serialized representation will be written.
Raises
------
OSError
If there is an error while writing to the file.
Returns
-------
None
"""
I think I got some docstring style wrong or just did not notice. Anyways this fixes the issue now.
Problem Description
Is raised, when I run
pdoc
with the following flagsFull stacktrace
```bash Traceback (most recent call last): File "/run/media/mrjd/DATA/University/Master_LMU/Praktika/PC-F-Praktikum/smPyFLIM/.venv/bin/pdoc", line 8, inI am not quite sure, what causes this issues and I am not quite sure, what the stacktrace should tell me. Why would there be a problem, while writing to the file?
If the template file, helps that I use, here it is:
Template File for math with `KaTeX`
```jinja2 {# This template is included in math mode and loads MathJax for formula rendering. #} {# #} ```I am not a web dev, so please excuse my bad template code. I just briefly put this togehter to have
KaTeX
support instead ofMathJax
(I wanted the lightweight and fast rendering).Steps to reproduce the behavior
pdoc
with commands as specified as aboveSystem Information
Paste the output of "pdoc --version" here.