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

nokogiri 1.5.6 breaks roo gem openoffice ods parsing #842

Closed
dc7kr opened this issue Jan 29, 2013 · 4 comments
Closed

nokogiri 1.5.6 breaks roo gem openoffice ods parsing #842

dc7kr opened this issue Jan 29, 2013 · 4 comments

Comments

@dc7kr
Copy link

dc7kr commented Jan 29, 2013

Updating my bundle to nokogiri 1.5.6 breaks roo ods spreadsheet parsing.

Steps to reproduce: install nokogiri 1.5.6 and roo 1.10.1 gems and exec the following ruby code:
require 'rubygems'
require 'roo'
doc = Openoffice.new("some.ods")
doc.sheets.each do |s|
puts s
end
No sheets are found as it cannot parse the sheets correctly.

downgrade nokogiri to 1.5.5. and re-run and it correctly displays all sheet names.

Not sure whether this is a bug in nokogiri or a change in the API that causes the roo gem to break.

@flavorjones
Copy link
Member

Hi! Thanks for reporting this issue.

Have you brought this up with the maintainer of roo? I'm happy to help diagnose, but without more information I can't promise there's anything we can do about it.

Can you provide a sample ods file so that I am reproducing exactly what you're describing?

@dc7kr
Copy link
Author

dc7kr commented Jan 31, 2013

Hi,

thanks for your reply. I did not yet notify the roo maintainers about this issue - I'd be grateful for a pointer to their
current bugtracker - found some related pages on the web (also a github page) but nothing recent. (my gem version is 1.10.1).

Regarding reproducibility: any ODS will do - simply create an empty spreadsheet, add some sheets and give one of the sheets a well defined name for later recognition in the ruby code.

If you for example do

doc.default_sheet = "MyWellDefinedTitle" 

it works fine with 1.5.5 but gives a "RangeError" exception when using nokogiri 1.5.6.

Best regards

Karsten

@dc7kr
Copy link
Author

dc7kr commented Mar 1, 2013

Hi,

I just found out that this is related to the issue #816

roo uses the [] operator to retrieve attribute values which as it seems now needs the namespaces
table names are found using table['name'] which now has to be table['table:name']

As #816 seems to be an API change and not a bug I vote for closing this bug.

@flavorjones
Copy link
Member

Closing, per your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants