Comments (4)
The above exception was the direct cause of the following exception:
Please post the full output.
from pdoc.
Sure. This package relies on Cython, maybe this information could be useful. Here it is (works without --output-dir mlsauce-docs
):
pdoc -t docs mlsauce/* --output-dir mlsauce-docs
Traceback (most recent call last):
File "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/pdoc/extract.py", line 217, in load_module
return importlib.import_module(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/t/Documents/Python_Packages/mlsauce/mlsauce/tests/test_adaopt.py", line 8, in <module>
from mlsauce import mlsauce
ImportError: cannot import name 'mlsauce' from 'mlsauce' (/Users/t/Documents/Python_Packages/mlsauce/mlsauce/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/t/Documents/Python_Packages/mlsauce/venv/bin/pdoc", line 8, in <module>
sys.exit(cli())
^^^^^
File "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/pdoc/__main__.py", line 199, in cli
pdoc.pdoc(
File "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/pdoc/__init__.py", line 510, in pdoc
all_modules[module_name] = doc.Module.from_name(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/pdoc/doc.py", line 403, in from_name
return cls(extract.load_module(name))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.8/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/Users/t/Documents/Python_Packages/mlsauce/venv/lib/python3.11/site-packages/pdoc/extract.py", line 219, in load_module
raise RuntimeError(f"Error importing {module}") from e
RuntimeError: Error importing mlsauce.tests.test_adaopt
make: *** [docs] Error 1
from pdoc.
This is not a pdoc bug. The mlsauce/tests/test_adaopt.py file tries to import mlsauce.mlsauce, which does not exist. This only manifests in the second invocation, because the web-server loads sub packages only on demand.
You need to either fix the test file, or exclude it from processing (https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented).
from pdoc.
@mhils I'll try to exclude it from processing then. It's funny that by adding --output-dir mlsauce-docs
, it starts checking the tests and fails. Great package btw Highly customizable when you know Jinja and HTML.
from pdoc.
Related Issues (20)
- 🙏 HOT 1
- explicit re-export from a private module should make the member public HOT 2
- support the `@deprecated` decorator HOT 1
- Link is not working when class is included in `__all__`
- Fails without error in CI for certain import statements HOT 5
- Add `overflow-y: hidden;` to css style `mjx-container` HOT 1
- Error parsing annotation: 'type' object is not subscriptable HOT 2
- Error importing module: no signature found for builtin type `<class 'type I wrote'>` HOT 3
- Proposal: Document each member at the lowest-level submodule, with higher level modules pointing at submodule's primary declaration without duplicating them. HOT 2
- TypeError in /pdoc/extract.py HOT 2
- add pre-commit support HOT 1
- Support `start-after` option for `.. include::` directive HOT 1
- Way to add external Markdown file HOT 2
- A way to NOT inherit documentation for a specific class HOT 4
- `AssertionError: OSError: If there is an error while writing to the file.` Help would be appreciated HOT 1
- Can pdoc be further automated? HOT 3
- Including markdown is buggy and local images do not work HOT 4
- PyPi upload of 14.5 seems to have failed HOT 1
- Non-deterministic behavior with set literals HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdoc.