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

Elements in precice-config.xml need to be in specific order #21

Closed
MakisH opened this issue Apr 9, 2024 · 1 comment
Closed

Elements in precice-config.xml need to be in specific order #21

MakisH opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MakisH
Copy link
Member

MakisH commented Apr 9, 2024

In the current develop, the aste-turbine case does not work with the config-visualizer, because the m2n tag is defined before the participants tags:

https://github.com/precice/tutorials/blob/254f8247afe555e7cffc3ecc20e30a40620cd645/aste-turbine/precice-config.xml#L22-L27

Instead of a useful error message, I get:

~/repos/precice/tutorials/aste-turbine [add-config-visualizations]$ preciceToPNG
Traceback (most recent call last):
  File "/home/gc/.local/bin/precice-config-visualizer", line 8, in <module>
    sys.exit(main())
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/cli.py", line 65, in main
    dot = configFileToDotCode(args.infile, args)
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/common.py", line 437, in configFileToDotCode
    g = configToGraph(xml, args)
  File "/home/gc/.local/pipx/venvs/precice-config-visualizer/lib/python3.10/site-packages/preciceconfigvisualizer/common.py", line 299, in configToGraph
    lhead=participantClusterName[pto],
KeyError: 'A'

Moving the m2n tag after the participant tags works (implemented in precice/tutorials#514).

I guess the config-visualizer should not care what order the tags are defined in, but if it cares, an error would be helpful. In any case, not so important, as we should write our config files "tell a story". But it could confuse users.

@fsimonis
Copy link
Member

Fixed in 9b756d1

We now process elements in a fixed order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants