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

Bug: Nil cannot be coerced into integer #185

Closed
jmarsh24 opened this issue Aug 2, 2024 · 0 comments · Fixed by #186
Closed

Bug: Nil cannot be coerced into integer #185

jmarsh24 opened this issue Aug 2, 2024 · 0 comments · Fixed by #186

Comments

@jmarsh24
Copy link
Owner

jmarsh24 commented Aug 2, 2024

There is a problem importing the following ERT numbers
Image

this is a picture of the error
Image
These are the error logs.

/workspaces/tangocloud/app/models/external_catalog/el_recodo/song_scraper.rb:281:in `+'
/workspaces/tangocloud/app/models/external_catalog/el_recodo/song_scraper.rb:281:in `convert_duration_to_seconds'
/workspaces/tangocloud/app/models/external_catalog/el_recodo/song_scraper.rb:83:in `fetch'
/workspaces/tangocloud/app/models/external_catalog/el_recodo/song_synchronizer.rb:10:in `sync_song'
/workspaces/tangocloud/app/jobs/external_catalog/el_recodo/sync_song_job.rb:9:in `perform'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/execution.rb:69:in `block in _perform_job'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:106:in `in_transaction'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/instrumentation/active_job.rb:83:in `run_in_transaction'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/instrumentation/active_job.rb:69:in `perform'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/instrumentation/active_job.rb:23:in `block (4 levels) in <main>'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/i18n-1.14.5/lib/i18n.rb:351:in `with_locale'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/core_ext/time/zones.rb:65:in `use_zone'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/execution.rb:68:in `_perform_job'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/instrumentation.rb:32:in `_perform_job'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/execution.rb:52:in `perform_now'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/instrumentation.rb:26:in `block in perform_now'
/usr/local/rvm/gems/default/gems/activerecord-7.1.3/lib/active_record/railties/job_runtime.rb:13:in `block in instrument'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/instrumentation.rb:40:in `block in instrument'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/notifications.rb:206:in `block in instrument'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/notifications.rb:206:in `instrument'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/instrumentation.rb:39:in `instrument'
/usr/local/rvm/gems/default/gems/activerecord-7.1.3/lib/active_record/railties/job_runtime.rb:11:in `instrument'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/instrumentation.rb:26:in `perform_now'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/logging.rb:18:in `block in perform_now'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/tagged_logging.rb:135:in `block in tagged'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/tagged_logging.rb:39:in `tagged'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/tagged_logging.rb:135:in `tagged'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/broadcast_logger.rb:240:in `method_missing'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/logging.rb:25:in `tag_logger'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/logging.rb:18:in `perform_now'
/usr/local/rvm/gems/default/gems/sentry-rails-5.18.1/lib/sentry/rails/active_job.rb:9:in `block in perform_now'
/usr/local/rvm/gems/default/gems/sentry-rails-5.18.1/lib/sentry/rails/active_job.rb:41:in `block in record'
/usr/local/rvm/gems/default/gems/sentry-ruby-5.18.1/lib/sentry/hub.rb:59:in `with_scope'
/usr/local/rvm/gems/default/gems/sentry-ruby-5.18.1/lib/sentry-ruby.rb:384:in `with_scope'
/usr/local/rvm/gems/default/gems/sentry-rails-5.18.1/lib/sentry/rails/active_job.rb:24:in `record'
/usr/local/rvm/gems/default/gems/sentry-rails-5.18.1/lib/sentry/rails/active_job.rb:8:in `perform_now'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/execution.rb:30:in `block in execute'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/railtie.rb:67:in `block (4 levels) in <class:Railtie>'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/reloader.rb:77:in `block in wrap'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/execution_wrapper.rb:88:in `wrap'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/reloader.rb:74:in `wrap'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/local/rvm/gems/default/gems/activejob-7.1.3/lib/active_job/execution.rb:28:in `execute'
/usr/local/rvm/gems/default/gems/solid_queue-0.3.3/app/models/solid_queue/claimed_execution.rb:67:in `execute'
/usr/local/rvm/gems/default/gems/solid_queue-0.3.3/app/models/solid_queue/claimed_execution.rb:41:in `perform'
/usr/local/rvm/gems/default/gems/solid_queue-0.3.3/lib/solid_queue/pool.rb:23:in `block (2 levels) in post'
/usr/local/rvm/gems/default/gems/activesupport-7.1.3/lib/active_support/execution_wrapper.rb:92:in `wrap'
/usr/local/rvm/gems/default/gems/solid_queue-0.3.3/lib/solid_queue/app_executor.rb:7:in `wrap_in_app_executor'
/usr/local/rvm/gems/default/gems/solid_queue-0.3.3/lib/solid_queue/pool.rb:22:in `block in post'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `block in synchronize'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `synchronize'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `synchronize'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:22:in `execute'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/ivar.rb:170:in `safe_execute'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/future.rb:55:in `block in execute'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:434:in `block (2 levels) in thread_block_with_current_transaction'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:357:in `capture_segment_error'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:433:in `block in thread_block_with_current_transaction'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:359:in `run_task'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:350:in `block (3 levels) in create_worker'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `loop'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `block (2 levels) in create_worker'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `catch'
/usr/local/rvm/gems/default/gems/concurrent-ruby-1.3.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `block in create_worker'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:434:in `block (2 levels) in thread_block_with_current_transaction'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:357:in `capture_segment_error'
/usr/local/rvm/gems/default/gems/newrelic_rpm-9.11.0/lib/new_relic/agent/tracer.rb:433:in `block in thread_block_with_current_transaction'
 {
  "id": 6033,
  "queue_name": "background_sync",
  "class_name": "ExternalCatalog::ElRecodo::SyncSongJob",
  "arguments": {
    "job_class": "ExternalCatalog::ElRecodo::SyncSongJob",
    "job_id": "45073a45-4d17-477b-868a-b33a3e14a2db",
    "provider_job_id": null,
    "queue_name": "background_sync",
    "priority": null,
    "arguments": [
      {
        "ert_number": 8482,
        "_aj_ruby2_keywords": [
          "ert_number"
        ]
      }
    ],
    "executions": 0,
    "exception_executions": {},
    "locale": "en",
    "timezone": "UTC",
    "enqueued_at": "2024-07-28T16:38:25.487863859Z",
    "scheduled_at": null
  },
  "priority": 0,
  "active_job_id": "45073a45-4d17-477b-868a-b33a3e14a2db",
  "scheduled_at": null,
  "finished_at": null,
  "concurrency_key": "ExternalCatalog::ElRecodo::SyncSongJob/sync_song_job",
  "created_at": "2024-07-28T16:38:25.519Z",
  "updated_at": "2024-07-28T16:38:25.519Z"
}
jmarsh24 added a commit that referenced this issue Aug 17, 2024
commit d9df91d
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 16:10:56 2024 +0200

    rubocop

commit 0aff9ca
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 15:45:46 2024 +0200

    add guard clause for digital remaster importer

commit 419d5be
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 14:27:47 2024 +0200

    add more solid queue

commit bc786d1
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 14:27:23 2024 +0200

    add recurring tasks

commit 8794b5e
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 14:25:37 2024 +0200

    make configurable

commit 556691e
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:29:51 2024 +0200

    increase threads to 8

commit ceb3fea
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:27:59 2024 +0200

    update gems

commit c7f088b
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:24:57 2024 +0200

    update importer spec

commit bf39836
Merge: 58415ba bad0760
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:18:29 2024 +0200

    Merge branch 'main' into feature/seed_audio_files

commit bad0760
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:16:02 2024 +0200

    remove auth token

commit 58415ba
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 13:08:38 2024 +0200

    update statuses

commit d8a9dfc
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 12:47:21 2024 +0200

    add import for music

commit 0cf0efc
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 12:38:48 2024 +0200

    audio file export working

commit b047022
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 11:47:48 2024 +0200

    import from music

commit e01e4f5
Merge: 99c7ce7 d5fd7db
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 11:08:46 2024 +0200

    Merge branch 'main' into feature/seed_audio_files

commit d5fd7db
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 11:00:24 2024 +0200

    allow user to bypass the jwt in development

commit 99c7ce7
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 10:26:34 2024 +0200

    initial commit for Seed Audio Files

commit fcabd53
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 03:00:59 2024 +0200

    working profile load

commit aebd998
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 02:28:06 2024 +0200

    Squashed commit of the following:

    commit 66d68ac
    Author: Justin Marsh <jmarsh24@gmail.com>
    Date:   Sat Aug 17 02:27:18 2024 +0200

        Complete devcontainer setup (#190)

        * initial commit for Complete devcontainer setup, fixes #189

        * add

        * reset dockerfile

        * still working

        * more working

commit 66d68ac
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sat Aug 17 02:27:18 2024 +0200

    Complete devcontainer setup (#190)

    * initial commit for Complete devcontainer setup, fixes #189

    * add

    * reset dockerfile

    * still working

    * more working

commit 80a1770
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 23:10:21 2024 +0200

    use lfs

commit 5522a1c
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 22:52:59 2024 +0200

    break up seeds into multiple files

commit b9a5172
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 21:46:04 2024 +0200

    add readme

commit 41f687a
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 21:33:49 2024 +0200

    add progress bar

commit 7bc2a59
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 21:25:15 2024 +0200

    add el_recodo_seeds

commit aefb917
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 17:52:20 2024 +0200

    WIP

commit 7e03acf
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Fri Aug 16 16:06:54 2024 +0200

    initial commit for Create seeds for the application, fixes #156

commit 6456cae
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Thu Aug 15 18:20:38 2024 +0200

    return 0

commit 3cdc55d
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Wed Aug 14 18:48:02 2024 +0200

    Bug: Nil cannot be coerced into integer (#186)

    * initial commit for Bug: Nil cannot be coerced into integer, fixes #185

    * remove broken dev container stuff

    * use find_or_create_by

    * use find_or_create_by! instead

commit b4a3164
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Sun Aug 11 22:57:28 2024 +0200

    Audio File Import (#182)

    * initial commit for Add new musicians to DigitalRemasterImport, fixes #148

    * add new musicians

    * add viola

    * add tests

    * working tests

    * add test

    * reset

    * attach the images

    * only do it if image present too

    * fix .photos

    * set to image

    * fix attachment

    * remove

    * add error handling

    * fix end

    * add more tests

    * add nullability

    * fix

    * always raise error

    * importer

    * remove unnecessary rescue

    * initial commit for Audio File Import, fixes #181

    * importer working

    * remove useless test

    * enqueue the right job

    * add spec

    * working spec

    * remove unnecessary test

    * working

    * working audio file import

    * allow music folder to be available in container

    * fix importer

    * working spec

    * working

    * fix lyrics creation

    * remove duplicate

    * working

    * fix tests

    * rubocop

    * wip

    * move audio file under import domain

    * remove reference ot audio file

    * update

    * remove added complexity

    * fix!

    * updateot use locals

    * builder

    * lyric singular

    * use lyrics

    * add guard for specific translations

    * singer builder working

    * composition builder working

    * fix orchestra roles

    * update orchestra builder

    * recording builder working

    * working spec 6612

    * 5905 spec

    * working 6612 test

    * 3674 working

    * working 6612

    * 7514 working

    * TC6612 working

    * working search recordings

    * update factories and graphql

    * reorganize

    * ERT NUMBER

    * rename

    * builder spec working

    * builder spec working

    * tests passing

    * working audio folder converter

    * working integration spec

    * working

    * audio_file converter

    * fix migration

    * update schema.rb

    * remove tangotube

    * fix schema

    * fix composition

    * working types

    * fix import

    * add orchestra types

    * create_or_find_by

    * allow ssh connections

    * improve avo interface

    * fix n+1 on album art

    * improve avo

    * assign el_recodo_orchestra to orchestra upon import

commit 5bf2f5e
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Wed Jul 31 21:39:13 2024 +0200

    Add new musicians to DigitalRemasterImport (#173)

    * initial commit for Add new musicians to DigitalRemasterImport, fixes #148

    * add new musicians

    * add viola

    * add tests

    * working tests

    * add test

    * reset

    * attach the images

    * only do it if image present too

    * fix .photos

    * set to image

    * fix attachment

    * remove

    * add error handling

    * fix end

    * add more tests

    * add nullability

    * fix

    * always raise error

    * importer

    * remove unnecessary rescue

    * fix

    * hide page not found

    * working tests

commit a789026
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Wed Jul 31 21:18:43 2024 +0200

    Add belongs_to back to graphql (#172)

    * initial commit for Add belongs_to back to graphql, fixes #171

    * fix belongs to

commit b5482ea
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Wed Jul 31 00:23:17 2024 +0200

    initial commit for add nullability to el recodo songs (#180)

commit 2602fe9
Author: Justin Marsh <jmarsh24@gmail.com>
Date:   Wed Jul 31 00:05:56 2024 +0200

    SongScraper is missing error handling for certain errors (#178)

    * initial commit for SongScraper is missing error handling for certain errors, fixes #177

    * raise server error 503

    * fix updated at date parse

    * fix
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.

2 participants