YAML ParserException when reading ja.yml from redMine
-----------------------------------------------------
Key: JRUBY-964
URL: http://jira.codehaus.org/browse/JRUBY-964
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.0.0RC2
Reporter: Albert Strasheim
Attachments: ja.yml
The YAML parser fails when loading the attached file which comes from
[redMine|http://www.redmine.org/]. It's Japanese text, so maybe it isn't
supported yet?
The code:
{noformat}
require 'yaml'
raw_hash = YAML::load(File.read('ja.yml'))
{noformat}
The error:
ParserImpl.java:496:in `org.jvyamlb.ParserImpl$26.produce':
org.jvyamlb.ParserException: ParserException while scanning a block mapping we
had this expected <block end>, but found org.jvyamlb.tokens.ScalarToken
(NativeException)
from ParserImpl.java:823:in `org.jvyamlb.ParserImpl.parseStreamNext'
from ParserImpl.java:774:in `org.jvyamlb.ParserImpl.peekEvent'
from ComposerImpl.java:161:in `org.jvyamlb.ComposerImpl.composeNode'
from ComposerImpl.java:100:in `org.jvyamlb.ComposerImpl.composeDocument'
from ComposerImpl.java:76:in `org.jvyamlb.ComposerImpl.getNode'
from BaseConstructorImpl.java:97:in
`org.jvyamlb.BaseConstructorImpl.getData'
from RubyYAML.java:221:in `org.jruby.RubyYAML.load'
from null:-1:in `org.jruby.RubyYAMLInvokerSload1.call'
... 48 levels...
from Main.java:190:in `org.jruby.Main.runInterpreter'
from Main.java:120:in `org.jruby.Main.run'
from Main.java:95:in `org.jruby.Main.main'
Complete Java stackTrace
while scanning a block mapping
expected <block end>, but found org.jvyamlb.tokens.ScalarToken
org.jvyamlb.ParserException: ParserException while scanning a block mapping we
had this expected <block end>, but found org.jvyamlb.tokens.ScalarToken
at org.jvyamlb.ParserImpl$26.produce(ParserImpl.java:496)
at org.jvyamlb.ParserImpl.parseStreamNext(ParserImpl.java:823)
at org.jvyamlb.ParserImpl.peekEvent(ParserImpl.java:774)
at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:161)
at org.jvyamlb.ComposerImpl.composeDocument(ComposerImpl.java:100)
at org.jvyamlb.ComposerImpl.getNode(ComposerImpl.java:76)
at org.jvyamlb.BaseConstructorImpl.getData(BaseConstructorImpl.java:97)
at org.jruby.RubyYAML.load(RubyYAML.java:221)
at org.jruby.RubyYAMLInvokerSload1.call(Unknown Source)
at
org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:49)
at
org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:81)
at org.jruby.RubyObject.compilerCallMethod(RubyObject.java:510)
at
org.jruby.javasupport.util.CompilerHelpers.doInvokeDynamic(CompilerHelpers.java:123)
at EVAL8970973.__file__(EVAL8970973:2)
at EVAL8970973.run(EVAL8970973)
at org.jruby.Ruby.compileOrFallbackAndRun(Ruby.java:306)
at org.jruby.Main.runInterpreter(Main.java:233)
at org.jruby.Main.runInterpreter(Main.java:190)
at org.jruby.Main.run(Main.java:120)
at org.jruby.Main.main(Main.java:95)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email