Unreadable characters on Output files when try to use Coupling tools

Hello everyone !

When I use external coupling tool, it seems that an error occurs when I check the output file.

This error appear when specials characters are present in the output file. In that case, a message indicate that the expected number of output is 1 (or 2 or more according the case) and the number of output found is 0.

In fact, the characters [, ], ( and ) seems to generate this error.

For exemple, if the output file contain :
Contrainte [MPa] : 110.0
the reference text to be found “Contrainte [MPa] :” doen’t work

I have to modify the output file like this :
Contrainte in MPa : 110.0
without the [ and ] characters.

This restrictions may be very important especially if the user doen’t have the possibility to change the output file syntax (in commercial code for example).

Thank you !

Laurent

Hi Laurent,

Indeed, special characters like brackets or parenthesis are interfering with the coupling tools from OpenTURNS. One workaround is to escape the special characters when you define the tokens in your coupling model, that would give:

“Contrainte \[MPa\] :” instead of “Contrainte [MPa] :”

Let me know it this fixes the issue.
In the meantime we will work on a more robust solution concerning tokens that would ease their definition in persalys
Cheers

Hi Guillaume

Thank you for your solution, it works… :ok_hand:

Indeed, if you can find a global solution solution, it may be easier for users… But this solution works…

Bye

Laurent