zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

*** NoMethodError Exception: undefined method `pack' for nil:NilClass #76

Closed heaven closed 10 years ago

heaven commented 10 years ago

Hi, getting this after upgrade from 0.6.9 to 0.9.6:

sheet = Spreadsheet.open(self.src).worksheet(0)
sheet.rows
*** NoMethodError Exception: undefined method `pack' for nil:NilClass
sheet.rows
[#<Spreadsheet::Excel::Row:0x000000070ebb70 ...

First time when I call sheet.rows it always fail with the same error. I could email you the xls file I am working with.

Best, Alex

heaven commented 10 years ago

The backtrace:

"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/reader.rb:1154:in `read_note'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/reader.rb:886:in `read_worksheet'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/worksheet.rb:53:in `ensure_rows_read'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/worksheet.rb:46:in `each'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/worksheet.rb:71:in `to_a'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/spreadsheet-0.9.6/lib/spreadsheet/excel/worksheet.rb:71:in `rows'",
"/mnt/media/Work/workspace/crm/lib/import/profiles/xls.rb:149:in `perform'",
"/mnt/media/Work/workspace/crm/app/models/delayed_job.rb:276:in `block (3 levels) in run'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/bundler/gems/sunspot_index_queue-ff5a40f3aaf8/lib/sunspot/index_queue.rb:26:in `set_priority'",
"/mnt/media/Work/workspace/crm/app/models/delayed_job.rb:275:in `block (2 levels) in run'",
"/home/heaven/.rvm/gems/ruby-2.0.0-p247@crm/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection'",
"/mnt/media/Work/workspace/crm/app/models/delayed_job.rb:273:in `block in run'"
zdavatz commented 10 years ago

what about version 0.9.4? Please try that. Does that work?

zdavatz commented 10 years ago

Please post your XLS file somewhere Online and link it here.

heaven commented 10 years ago

Hi, 0.9.4 does not help. The file http://www.sendspace.com/file/ieu4zg

zdavatz commented 10 years ago

Ok, thanks for the link! Can you please "bisect" back and tell me from what version it starts working again.

0.9.3 0.9.2 0.9.1 0.9.0

etc

back to version

0.6.9

curious to know where it will start working again.