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

ODS export fails with undefined method `external_encoding' with nokogiri 1.14.0 and rubyzip 2.3.2 #9

Closed
dmolesUC opened this issue Jan 19, 2023 · 1 comment · Fixed by #10

Comments

@dmolesUC
Copy link
Contributor

Steps to reproduce:

  1. With nokogiri 1.14.0 and rubyzip 2.3.2 installed, run the "ODS formats" tests in spec/berkeley_library/tind/export/export_spec.rb.

Expected:

  • Tests pass.

Actual:

  • Tests fail:
    NoMethodError: undefined method `external_encoding' for #<Zip::OutputStream:0x0000000158a99ff8>
    
      0) BerkeleyLibrary::TIND::Export export with results export ODS formats accepts BerkeleyLibrary::TIND::Export::ExportFormat::ODS as a format parameter
         Failure/Error: doc.write_to(out, encoding: ENCODING, save_with: 0)
    
         NoMethodError:
           undefined method `external_encoding' for #<Zip::OutputStream:0x0000000158a99ff8>
         # /Users/david/.rvm/gems/ruby-2.7.5/gems/nokogiri-1.14.0-arm64-darwin/lib/nokogiri/xml/node.rb:1368:in `native_write_to'
         # /Users/david/.rvm/gems/ruby-2.7.5/gems/nokogiri-1.14.0-arm64-darwin/lib/nokogiri/xml/node.rb:1368:in `write_to'
         # /Users/david/.rvm/gems/ruby-2.7.5/gems/nokogiri-1.14.0-arm64-darwin/lib/nokogiri/html5/node.rb:37:in `write_to'
         # ./lib/berkeley_library/util/ods/xml/document_node.rb:37:in `write_xml_to_stream'
         # ./lib/berkeley_library/util/ods/xml/document_node.rb:21:in `to_xml'
         # ./lib/berkeley_library/util/ods/spreadsheet.rb:157:in `write_zip_entry'
         # ./lib/berkeley_library/util/ods/spreadsheet.rb:147:in `block (2 levels) in write_zipfile'
         # ./lib/berkeley_library/util/ods/spreadsheet.rb:130:in `each_document'
         # ./lib/berkeley_library/util/ods/spreadsheet.rb:147:in `block in write_zipfile'
         # /Users/david/.rvm/gems/ruby-2.7.5/gems/rubyzip-2.3.2/lib/zip/output_stream.rb:63:in `write_buffer'
         # ./lib/berkeley_library/util/ods/spreadsheet.rb:146:in `write_zipfile'
    
@dmolesUC
Copy link
Contributor Author

dmolesUC commented Jan 19, 2023

Probably related to sparklemotion/nokogiri@795464c. See sparklemotion/nokogiri#2773.

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

Successfully merging a pull request may close this issue.

1 participant