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
AssertionError: OSError: If there is an error while writing to the file.
Help would be appreciated
#689
Comments
SolutionI debugged the I investigated my code further and after some examination, I found that my docstring was wrongly formatted (not according to 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
AssertionError: OSError: If there is an error while writing to the file.
Is raised, when I run
pdoc
with the following flagsFull stacktrace
I 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`
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.
> pdoc --version pdoc: 14.4.0 Python: 3.11.8 Platform: Linux-6.6.26-1-MANJARO-x86_64-with-glibc2.39
The text was updated successfully, but these errors were encountered: