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

Show PlantUML syntax errors properly #22

Open
fuhrmanator opened this issue Mar 25, 2022 · 0 comments
Open

Show PlantUML syntax errors properly #22

fuhrmanator opened this issue Mar 25, 2022 · 0 comments

Comments

@fuhrmanator
Copy link

This package works great (and is simple) in colab.research.google.com (it's how I'm using it).

But, whenever there's a mistake in the PlantUML source, there's a traceback that is not useful, instead of a helpful error that PlantUML's server is giving.

For example, in the following cell, note is mistyped with a space in the middle: no te which is a syntax error:

%%plantuml

@startuml
Alice->Bob: Authentication Request
no te right of Bob: Bob thinks about it
Bob->Alice: Authentication Response
@enduml

If I try that on the PlantUML server, I see this info:

image

If I try it in colab, I get this:

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
[<ipython-input-61-2db41d0c2e9c>](https://localhost:8080/#) in <module>()
----> 1 get_ipython().run_cell_magic('plantuml', '', '\n@startuml\nAlice->Bob: Authentication Request\nno te right of Bob: Bob thinks about it\nBob->Alice: Authentication Response\n@enduml')


4 frames
[/usr/lib/python3.7/subprocess.py](https://localhost:8080/#) in check_call(*popenargs, **kwargs)
    361         if cmd is None:
    362             cmd = popenargs[0]
--> 363         raise CalledProcessError(retcode, cmd)
    364     return 0
    365 


CalledProcessError: Command '['plantweb', '--format', 'auto', 'e7a6b5e9-9c57-49b2-9bde-1ae3e8bbadbd.uml']' returned non-zero exit status 1.
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