I have a very large YAML file (approx 5000 entries) that I am loading.
Somewhere along the way, it doesn’t like something in the file so I
get a :
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/
lib/ruby/1.8/yaml.rb:133:in utc': time out of range (ArgumentError) from /Applications/Locomotive2/Bundles/ standardRailsMar2007.locobundle/i386/lib/ruby/1.8/yaml.rb:133:innode_import’
from /Applications/Locomotive2/Bundles/
standardRailsMar2007.locobundle/i386/lib/ruby/1.8/yaml.rb:133:in load' from /Applications/Locomotive2/Bundles/ standardRailsMar2007.locobundle/i386/lib/ruby/1.8/yaml.rb:133:inload’
Which is all well and good but it doesn’t give me the offending line
in the YAML file. Anyone write anything out there that helps pinpoint
where in your YAML file things went south?
I have a very large YAML file (approx 5000 entries) that I am loading.
Somewhere along the way, it doesn’t like something in the file so I
get a :
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/
lib/ruby/1.8/yaml.rb:133:in `utc’: time out of range (ArgumentError)
Which is all well and good but it doesn’t give me the offending line
in the YAML file. Anyone write anything out there that helps pinpoint
where in your YAML file things went south?
I asked this before and got nothing. Syck simply needs a new feature.
YAML
is not useful until its parsing becomes fault-tolerance and
introspective.
Workaround: Can you cut your file up into 5000 files of 1 entry each?
Seriously - to make one file out of them, I would host each segment in
There is another “C” version of YAML which is quite fast and gives very
good exception reporting, at http://pyyaml.org/wiki/LibYAML, perhaps it
needs a ruby binding? For a pure ruby solution, see http://rbyaml.rubyforge.org/
it should also have better error reporting than syck.
On Tue, Aug 14, 2007 at 07:50:19PM -0700, Phlip wrote:
| I asked this before and got nothing. Syck simply needs a new feature. YAML
| is not useful until its parsing becomes fault-tolerance and introspective.
On Tue, Aug 14, 2007 at 08:34:38PM -0700, Phlip wrote:
| The outer problem is fault tolerance. Our programs can only be as
| user-friendly and fault-tolerant as their libraries. The lower the library,
| the more tolerance. I can’t ask my customers to enter all their data in YAML
| until I can highlight the line and column of their errors for them.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.