Skip to content
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

Image directive scale parameter unsupported. Missing error message. #41

Open
dadada opened this issue Feb 9, 2023 · 0 comments
Open

Comments

@dadada
Copy link

dadada commented Feb 9, 2023

Tried the longer example for an image directive from https://docutils.sourceforge.io/docs/ref/rst/directives.html#images

.. image:: picture.jpeg
   :height: 100px
   :width: 200 px
   :scale: 50 %
   :alt: alternate text
   :align: right

Then run flamingo server -s settings.py --debug.

This shows

image

And the console output is

$ flamingo server -s settings.py --debug
ERROR:flamingo:content/index.rst:45: Error in "image" directive:
starting server on http://localhost:8080/

This is missing some useful debug output, even though the --debug flag has been passed.

Same thing with flamingo build -s settings.py --debug

023-02-09 06:53:27 gorgon flamingo.core.PluginManager[1493560] DEBUG running plugin hook 'media_added'
2023-02-09 06:53:27 gorgon flamingo.core.PluginManager[1493560] DEBUG running Thumbnails.media_added
2023-02-09 06:53:27 gorgon flamingo.plugins.Thumbnails[1493560] DEBUG processing index.rst:pool.jpeg
2023-02-09 06:53:27 gorgon flamingo.plugins.Thumbnails[1493560] DEBUG setup thumbnail for index.rst:pool.jpeg (6ef920df1617bff6aecf0b084df62c6c)
2023-02-09 06:53:27 gorgon flamingo.core.media[1493560] DEBUG thumbs/6ef920df1617bff6aecf0b084df62c6c.jpeg added to index.rst
2023-02-09 06:53:27 gorgon flamingo.plugins.reStructuredText[1493560] DEBUG <string>:38: (ERROR/3) Error in "image" directive:
unknown option: "scale".

.. image:: pool.jpeg
      :height: 100px
      :width: 200 px
      :scale: 50 %
      :alt: alternate text
      :align: right
NoneType: None
2023-02-09 06:53:27 gorgon flamingo[1493560] ERROR content/index.rst:45: Error in "image" directive:

This looks like the error message is truncated to a single line when running without --debug or in as a server. Also, the useful part of the error is printed as a debug message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant