Warning: <stdin>: syntax error in line 1 near 'No'
galindro opened this issue · 11 comments
If I use the command line to export roles dependencies into a png file, the bellow error is displayed:
$ ansigenome export ./git_repos/devops/roles/ -o ./git_repos/devops/roles/role_schema.png
Warning: <stdin>: syntax error in line 1 near 'No'
But it works if I go to role directory and execute the command like as bellow:
$ cd ./git_repos/devops/roles/ && ansigenome export -o role_schema.png
The issue you describe has plagued me for a while, too:
$ ansigenome export roles -o role_schema.png
Warning: <stdin>: syntax error in line 1 near 'No'
Even running the command from within my roles directory doesn't help:
$ cd roles && ansigenome export -o role_schema.png
Warning: <stdin>: syntax error in line 20 near '-'
Interesting that we're getting different syntax errors. I assume this is related to YAML parsing, but the error message is rather ambiguous. This error occurs on v0.5.3.
@nickjj Yes, every ansigenome command except export
runs without error. Previously I'd only tried ansigenome scan <roles_dir>
, since the other commands seem tailored to roles distributed via galaxy. Just now I tested each one and encountered no issues.
I'm getting a similar error. My hunch is ansigenome is passing a mix of valid instructions and a plain-text error message like "No such file or directory" or some variation of that into the graphviz stdin, based on my error message and @conorsch's. Here's mine:
ansigenome export -o /tmp/deps.png -f png
Error: <stdin>: syntax error in line 23 near '.'
+1, i ran into the same thing.
@focusaurus The dot issue should be fixed by #36. Can anyone provide the dot file to analyze this issue further? ansigenome export -o role_schema.dot -f dot
Thanks @ypid, I just merged it.
Expect a new version of Ansigenome in a day or 2 on PyPi.
@conorsch Someone else just reported your same issue. We started eliminating roles until it worked.
The issue is one or more of your roles may have hyphens in their name, and the error is thrown when you reference those roles as dependencies in meta/main.yml
.
For example:
This fails: - { role: foobar-hello }
This fails: - { role: 'foobar-hello' }
This works: - { role: foobar.hello }
Can you validate the above on your end?
Closing this as the new v0.5.6
version fixes this along with a number of other issues. It's up on PyPi.
@nickjj Great! Still waiting on v0.5.6
to hit pip
, then I'll grab the new version and confirm the fix.