getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.58k stars 443 forks source link

nikola auto failing #3776

Open mcavigelli opened 1 month ago

mcavigelli commented 1 month ago

Environment

Tested and seen on two computers. In both cases running nikola in virtual environment.

Description

I am new to nikola, I do not know if this is a regression.

  1. I start a website with nikola auto. 1.1 website starts
  2. I change a file 2.1 nikola tries to reload,
    • Windows: fails to reload (message see below)
    • Linux: reload succeeds, but with error message (see below)

On Windows the message is the following:

[2024-05-23 22:01:47] ERROR: asyncio: Task exception was never retrieved future: <Task finished name='Task-8' coro=<CommandAuto.queue_rebuild() done, defined at C:\Users\\nikola-env\Lib\site-packages\nikola\plugins\command\auto__init.py:362> exception=FileNotFoundError(2, 'The system cannot find the path specified')> Traceback (most recent call last): File "C:\Users\\nikola-env\Lib\site-packages\nikola\plugins\command\auto\init__.py", line 369, in queue_rebuild is_hidden = os.stat(event_path).st_file_attributes & stat.FILE_ATTRIBUTE_HIDDEN

On Linux the message is the following:

ValueError: no path specified [2024-05-23 22:17:27] ERROR: asyncio: Task exception was never retrieved future: <Task finished name='Task-179' coro=<CommandAuto.reload_page() done, defined at //nikola-env/lib/python3.11/site-packages/nikola/plugins/command/auto/init.py:427> exception=ValueError('no path specified')> Traceback (most recent call last): File "//nikola-env/lib/python3.11/site-packages/nikola/plugins/command/auto/init.py", line 435, in reload_page p = os.path.relpath(event_path, os.path.abspath(self.site.config['OUTPUT_FOLDER'])).replace(os.sep, '/') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 490, in relpath ValueError: no path specified [2024-05-23 22:17:27] ERROR: asyncio: Task exception was never retrieved future: <Task finished name='Task-180' coro=<CommandAuto.reload_page() done, defined at //nikola-env/lib/python3.11/site-packages/nikola/plugins/command/auto/init.py:427> exception=ValueError('no path specified')> Traceback (most recent call last): File "//nikola-env/lib/python3.11/site-packages/nikola/plugins/command/auto/init.py", line 435, in reload_page p = os.path.relpath(event_path, os.path.abspath(self.site.config['OUTPUT_FOLDER'])).replace(os.sep, '/') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 490, in relpath ValueError: no path specified

evgeni commented 1 month ago

This (well, the linux part) was fixed in https://github.com/getnikola/nikola/pull/3775 but not released yet

mcavigelli commented 1 month ago

I did not check closed issues before submitting this one, sorry.

Looking forward to test in on Linux in a new release.

Thanks for the fix.