weshatheleopard / rubyXL

Ruby lib for reading/writing/modifying .xlsx and .xlsm files
MIT License
1.28k stars 255 forks source link

Writing to a file causes `undefined method `href' for nil:NilClass` error #332

Closed Plotist closed 5 years ago

Plotist commented 5 years ago

I've been trying both write and stream on that with a same result.

path = "./tmp/some.xlsx"
workbook = RubyXL::Parser.parse(path)
workbook.write(path)
workbook = RubyXL::Parser.parse(path)

Results in on the last step => NoMethodError: undefined method 'href' for nil:NilClass from /Users/plotist/.rvm/gems/ruby-2.6.2@rubyxl-my-gemset/gems/rubyXL-3.4.2/lib/rubyXL/objects/ooxml_object.rb:147:in 'block in parse'

weshatheleopard commented 5 years ago

I tried on my test file and did not encounter any problems. I believe the problem is in the file you are trying to parse. Please attach it to this bug so I can take a look.

Plotist commented 5 years ago

I can't seem to find one. Sorry to bother you! I'll jump back and will upload the one it was failing on if I will be able to find it.