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

Error due to yml file should clearly state the yml filename #434

Closed
ge0ffrey opened this issue Sep 12, 2014 · 2 comments
Closed

Error due to yml file should clearly state the yml filename #434

ge0ffrey opened this issue Sep 12, 2014 · 2 comments
Milestone

Comments

@ge0ffrey
Copy link
Contributor

I got this error after changing a few files:

.../ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:203:in parse': (<unknown>): mapping values are not allowed in this context at line 27 column 22 (Psych::SyntaxError) from /home/gdesmet/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:203:inparse_stream'
from /home/gdesmet/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:151:in parse' from /home/gdesmet/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:127:inload'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/engine.rb:156:in load_yaml' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/engine.rb:125:inblock in load_yamls'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/engine.rb:124:in each' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/engine.rb:124:inload_yamls'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/engine.rb:65:in run' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/cli/generate.rb:21:inrun'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/cli/invoker.rb:125:in invoke_generate' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/lib/awestruct/cli/invoker.rb:49:ininvoke!'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/gems/awestruct-0.5.5/bin/awestruct:9:in <top (required)>' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/bin/awestruct:23:inload'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/bin/awestruct:23:in <main>' from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:ineval'
from /home/gdesmet/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `

'

It's not clear which file is causing it, so I needed to trial-and-error to find the cause. The cause wasn't in my complex new haml-ruby code, but in the very simplistic new yml file where I added this line:
title: OptaPlanner: Optimizing vehicle routes, shift rosters and other NP-hard problems
(If you're looking for a way to reproduce, the second ":" is not valid yml syntax.)

@LightGuard
Copy link
Member

do you have a small reproducible test, or site?

@ge0ffrey
Copy link
Contributor Author

@LightGuard Yes, clone https://github.com/droolsjbpm/optaplanner-website and put 2 :'s on a single yml line

@LightGuard LightGuard added this to the 0.5.6 milestone Sep 26, 2014
LightGuard added a commit to LightGuard/awestruct that referenced this issue Sep 26, 2014
The standard errors that happen if there are problems during page
generation are now used for yaml loading errors. It will now tell you
the file that was being processed, and the error message along with
backtrace.

Also did some reformatting in the base_tilt_handler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants