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

Explicit and easy-to-understand errors in the annotation directive #173

Open
markkuriekkinen opened this issue Oct 9, 2023 · 0 comments
Labels
requester: Aalto teacher The issue is raised by a teacher from Aalto University type: bug This is a bug which is critical for the correct operation of the system

Comments

@markkuriekkinen
Copy link
Contributor

A teacher tried to use the code-block directive inside the annotation directive. The compilation error message about this is not easy to understand and thus, the teacher did not know that the problem stems from the invalid use of the annotation directive. Could the error message be more clear and explicit?

(NB. code-block may be used inside annotated, but not inside annotation that defines the text that is shown during mouse hovering.)

https://github.com/apluslms/a-plus-rst-tools/blob/master/directives/annotated.py
https://github.com/apluslms/a-plus-rst-tools/blob/master/README.md#11-annotated-code-blocks

The confusing error message that the teacher saw was this traceback:

Exception occurred:
  File "/usr/local/lib/python3.7/dist-packages/docutils/nodes.py", line 652, in __getitem__
    return self.attributes[key]
KeyError: 'name'

Internal ticket:
https://rt.cs.aalto.fi/Ticket/Display.html?id=24428

@markkuriekkinen markkuriekkinen added type: bug This is a bug which is critical for the correct operation of the system requester: Aalto teacher The issue is raised by a teacher from Aalto University labels Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requester: Aalto teacher The issue is raised by a teacher from Aalto University type: bug This is a bug which is critical for the correct operation of the system
Projects
None yet
Development

No branches or pull requests

1 participant