Linbreux / wikmd

A file based wiki that uses markdown
https://linbreux.github.io/wikmd/
MIT License
341 stars 37 forks source link

FileNotFoundError: [Errno 2] No such file or directory: ".../plugins/draw/drawings" #167

Closed marriotb closed 2 months ago

marriotb commented 3 months ago

Installing from PyPi, using pip, results in the error above on first start.

In more detail:

❯ python -m wikmd.wiki
DrawIO integration
Alerts system
Mermaid integration
embed-pages
[2024-08-01 16:04:14,540] INFO in image_manager: Checking if webp is available for image optimization ...
1.4.0
libsharpyuv: 0.4.0
WebP Encoder version: 1.4.0
WebP Mux version: 1.4.0
[2024-08-01 16:04:14,555] INFO in wiki: Starting Wikmd with wiki directory /Users/brian/wikmd/wiki
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/brian/.local/share/virtualenvs/wikmd-Uukyb1hV/lib/python3.12/site-packages/wikmd/wiki.py", line 578, in <module>
    run_wiki()
  File "/Users/brian/.local/share/virtualenvs/wikmd-Uukyb1hV/lib/python3.12/site-packages/wikmd/wiki.py", line 558, in run_wiki
    setup_wiki_template()
  File "/Users/brian/.local/share/virtualenvs/wikmd-Uukyb1hV/lib/python3.12/site-packages/wikmd/wiki.py", line 547, in setup_wiki_template
    plugin.post_setup()
  File "/Users/brian/.local/share/virtualenvs/wikmd-Uukyb1hV/lib/python3.12/site-packages/wikmd/plugins/draw/draw.py", line 34, in post_setup
    for item in os.listdir(os.path.join(self.this_location, "drawings")):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/brian/.local/share/virtualenvs/wikmd-Uukyb1hV/lib/python3.12/site-packages/wikmd/plugins/draw/drawings'
>

I'm running in a pipenv-created venv rather than using virtualenv, but I don't think that's the issue.

Adding an empty directory drawings to the .../plugins/draw/ directory solves the issue.

MacOS 14.5, Python 3.12.4

Linbreux commented 3 months ago

@marriotb I think this is the bug thats fixed in 5b9f410. I'll create a new release for it! Thanks for the heads up

Linbreux commented 3 months ago

nvm, it's another issue...