datashift_spree
datashift_spree copied to clipboard
Fails to import previously exported model
- Do export of Spree's Product model (output format does not matter)
bundle exec thor datashift:export:csv -m Spree::Product -r products_out.csv - Try to import it back
bundle exec thor datashift:import:csv -i products_out.csv -m Spree::Product
Loading from CSV file: products_out.csv Processing 16 rows
Processing Summary Report
Processed total of 16 entries 0 objects were succesfully processed. WARNING : Check logs : 16 rows contained errors and 16 records NOT created. CSV loading stage complete - 0 rows added.
So it fails to import the same previously exported data. Log file does not describe the issue, just 'Failed to process row [nn]' without any additional info. Passing `-v' parameter at import command instead of turning on verbosity fails with
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/tagged_logging.rb:72:in
method_missing': undefined methodverbose' for #ActiveSupport::BufferedLogger:0x0000000345cc40 (NoMethodError)
Seems like an another bug.
I've to add when I open the exported CSV or Excel file in an text editor or in Libreoffice's Calc, content seems quite correct.