Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

import-entries error on OS X El Capitan #25

Closed
oddmouse opened this issue Feb 4, 2016 · 3 comments
Closed

import-entries error on OS X El Capitan #25

oddmouse opened this issue Feb 4, 2016 · 3 comments

Comments

@oddmouse
Copy link

oddmouse commented Feb 4, 2016

I'm using this after successfully exporting from the wordpress-exporter. The import-content-model command works perfectly and the import command works up until the entry part and then gives the same output:

$ contentful-importer --configuration=settings.yml import-entries
/usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/data_organizer.rb:28:in `/': divided by 0 (ZeroDivisionError)
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/data_organizer.rb:28:in `split_entries'
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/data_organizer.rb:19:in `execute'
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/parallel_importer.rb:31:in `import_data'
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/import_entries.rb:14:in `import'
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/lib/contentful/importer/import_entries.rb:19:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
    from /usr/local/lib/ruby/gems/2.3.0/gems/contentful-importer-0.2.1/bin/contentful-importer:12:in `<top (required)>'
    from /usr/local/bin/contentful-importer:22:in `load'
    from /usr/local/bin/contentful-importer:22:in `<main>'

Here is my settings.yml:

#PATH to all data
data_dir: exported/news

########## IMPORT DATA TO CONTENTFUL ##########

## EXPORTED XML FILE FROM WORDPRESS
wordpress_xml_path: wordpress_settings/wp-news-2016-02-03.xml

## CONVERT CONTENTFUL MODEL TO CONTENTFUL IMPORT STRUCTURE
content_model_json: wordpress_settings/contentful_model.json
converted_model_dir: wordpress_settings/contentful_structure.json

contentful_structure_dir: wordpress_settings/default_contentful_structure.json

# Contentful credentials
access_token: XXX
organization_id: XXX
space_id: XXX
default_locale: en-US
@neonichu
Copy link
Contributor

neonichu commented Feb 4, 2016

I believe this is the issue fixed by #24, but there hasn't been a new gem release since merging that. For the time being, you can either use master or explicitly pass a non-zero thread count on the commandline , e.g. --threads=1.

@dlitvakb
Copy link
Contributor

dlitvakb commented Feb 4, 2016

Hey @oddmouse,

Releasing a new version now with your issue fixed.

Cheers

@dlitvakb dlitvakb closed this as completed Feb 4, 2016
@oddmouse
Copy link
Author

oddmouse commented Feb 4, 2016

Thanks @neonichu and @dlitvakb. You guys are quick! Works like a charm.

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

No branches or pull requests

3 participants