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

Importing exported Excel fails #91

Open
carlobeltrame opened this issue Jun 28, 2022 · 0 comments
Open

Importing exported Excel fails #91

carlobeltrame opened this issue Jun 28, 2022 · 0 comments

Comments

@carlobeltrame
Copy link

When importing the following excel file:
Grundplattform zusätzlich.xlsx
using the latest git commit version of term customizer (remote: https://github.com/mainio/decidim-module-term_customizer.git, revision: 0046905fff1fbf24ff721a8d8c30e2b767c448fb, ref: develop), we get the following error:

NoMethodError: undefined method `value' for nil:NilClass
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:18:in `map'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:18:in `block in read_rows'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `block in each'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `each'
  from rubyXL (3.4.24) lib/rubyXL/worksheet.rb:23:in `each'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:17:in `each_with_index'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/readers/xlsx.rb:17:in `read_rows'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:52:in `collection_data'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:40:in `collection'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:31:in `block in import'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
  from activesupport (6.0.5) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
  from activerecord (6.0.5) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
  from activerecord (6.0.5) lib/active_record/transactions.rb:212:in `transaction'
  from decidim-module-term_customizer (0046905fff1f) lib/decidim/term_customizer/import/importer.rb:29:in `import'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:70:in `import_file'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:57:in `import_translations'
  from decidim-module-term_customizer (0046905fff1f) app/commands/decidim/term_customizer/admin/import_set_translations.rb:34:in `call'
  from rectify (0.13.0) lib/rectify/command.rb:30:in `call'
  from decidim-module-term_customizer (0046905fff1f) app/controllers/decidim/term_customizer/admin/translations_controller.rb:109:in `import'
  from actionpack (6.0.5) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
  from actionpack (6.0.5) lib/abstract_controller/base.rb:195:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/rendering.rb:30:in `process_action'
  from actionpack (6.0.5) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:112:in `block in run_callbacks'
  from activesupport (6.0.5) lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
  from decidim-core (0.26.1) app/controllers/concerns/decidim/use_organization_time_zone.rb:21:in `use_organization_time_zone'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from i18n (1.10.0) lib/i18n.rb:328:in `with_locale'
  from decidim-core (0.26.1) app/controllers/concerns/decidim/locale_switcher.rb:24:in `switch_locale'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from sentry-raven (3.1.2) lib/raven/integrations/rails/controller_transaction.rb:7:in `block in included'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `instance_exec'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:139:in `run_callbacks'
  from actionpack (6.0.5) lib/abstract_controller/callbacks.rb:41:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/rescue.rb:22:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
  from activesupport (6.0.5) lib/active_support/notifications.rb:180:in `block in instrument'
  from activesupport (6.0.5) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
  from activesupport (6.0.5) lib/active_support/notifications.rb:180:in `instrument'
  from actionpack (6.0.5) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
  from actionpack (6.0.5) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
  from activerecord (6.0.5) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
  from actionpack (6.0.5) lib/abstract_controller/base.rb:136:in `process'
  from actionview (6.0.5) lib/action_view/rendering.rb:39:in `process'
  from actionpack (6.0.5) lib/action_controller/metal.rb:190:in `dispatch'
  from actionpack (6.0.5) lib/action_controller/metal.rb:254:in `dispatch'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:33:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `public_send'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `method_missing'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `public_send'
  from railties (6.0.5) lib/rails/railtie.rb:190:in `method_missing'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
  from actionpack (6.0.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:49:in `block in serve'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `each'
  from actionpack (6.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'
  from actionpack (6.0.5) lib/action_dispatch/routing/route_set.rb:834:in `call'
  from batch-loader (1.5.0) lib/batch_loader/middleware.rb:11:in `call'
  from rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:202:in `call!'
  from omniauth (2.1.0) lib/omniauth/strategy.rb:169:in `call'
  from omniauth (2.1.0) lib/omniauth/builder.rb:44:in `call'
  from warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
  from warden (1.2.9) lib/warden/manager.rb:34:in `catch'
  from warden (1.2.9) lib/warden/manager.rb:34:in `call'
  from decidim-core (0.26.1) lib/decidim/middleware/strip_x_forwarded_host.rb:12:in `call'
  from decidim-module-decidim_awesome (658d226e9ed1) app/middleware/decidim/decidim_awesome/current_config.rb:33:in `call'
  from decidim-core (0.26.1) lib/decidim/middleware/current_organization.rb:22:in `call'
  from rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
  from rack (2.2.3) lib/rack/etag.rb:27:in `call'
  from rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
  from rack (2.2.3) lib/rack/head.rb:12:in `call'
  from actionpack (6.0.5) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
  from rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
  from rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/cookies.rb:654:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
  from activesupport (6.0.5) lib/active_support/callbacks.rb:101:in `run_callbacks'
  from actionpack (6.0.5) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
  from lograge (0.12.0) lib/lograge/rails_ext/rack/logger.rb:18:in `call_app'
  from railties (6.0.5) lib/rails/rack/logger.rb:26:in `block in call'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:80:in `block in tagged'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:28:in `tagged'
  from activesupport (6.0.5) lib/active_support/tagged_logging.rb:80:in `tagged'
  from railties (6.0.5) lib/rails/rack/logger.rb:26:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
  from request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/request_id.rb:27:in `call'
  from rack (2.2.3) lib/rack/method_override.rb:24:in `call'
  from activesupport (6.0.5) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/executor.rb:14:in `call'
  from rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
  from actionpack (6.0.5) lib/action_dispatch/middleware/host_authorization.rb:97:in `call'
  from sentry-raven (3.1.2) lib/raven/integrations/rack.rb:51:in `call'
  from prometheus_exporter (2.0.2) lib/prometheus_exporter/middleware.rb:34:in `call'
  from rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
  from railties (6.0.5) lib/rails/engine.rb:527:in `call'
  from puma (5.6.4) lib/puma/configuration.rb:252:in `call'
  from puma (5.6.4) lib/puma/request.rb:77:in `block in handle_request'
  from puma (5.6.4) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
  from puma (5.6.4) lib/puma/request.rb:76:in `handle_request'
  from puma (5.6.4) lib/puma/server.rb:441:in `process_client'
  from puma (5.6.4) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

We are using decidim 0.26.1.

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

1 participant