Uploaded image for project: 'CritiqueBrainz'
  1. CritiqueBrainz
  2. CB-339

Cannot import latest dumps

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • v-2019-02
    • None
    • None
    • None

      $ docker-compose -f docker/docker-compose.dev.yml run critiquebrainz python3 manage.py dump import cbdump-reviews-all.tar.bz2
      Creating docker_db_test_1 ... done
      Creating docker_critiquebrainz_redis_1 ... done
      Creating docker_db_1 ... done
      Creating docker_musicbrainz_db_1 ... done
      Table user already contains data. Skipping.
      Table license already contains data. Skipping.
      Importing data into review table.
      Traceback (most recent call last):
      File "manage.py", line 185, in <module>
      cli()
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in _call_
      return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
      rv = self.invoke(ctx)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
      return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
      return callback(*args, **kwargs)
      File "/code/critiquebrainz/data/utils.py", line 104, in decorated
      return f(*args, **kwargs)
      File "/code/critiquebrainz/data/dump_manager.py", line 442, in importer
      import_data(os.path.join(temp_dir, 'cbdump', 'review'), 'review')
      File "/code/critiquebrainz/data/dump_manager.py", line 471, in import_data
      cursor.copy_from(f, '"

      {table_name}

      "'.format(table_name=table_name), columns=columns)
      psycopg2.IntegrityError: new row for relation "review" violates check constraint "published_on_null_for_drafts_and_not_null_for_published_reviews"
      DETAIL: Failing row contains (a2333c98-3925-4d0b-8a2c-077f9c4a3559, 68c649d2-5b30-4311-ade8-acba2d2be22f, release_group, edb4aa36-4932-46e2-9be8-3da65de02948, 0, f, f, CC BY-SA 3.0, en, null, null, null).
      CONTEXT: COPY review, line 1: "a2333c98-3925-4d0b-8a2c-077f9c4a3559 68c649d2-5b30-4311-ade8-acba2d2be22f release_group edb4aa36-493..."

            iliekcomputers Param Singh
            code-master5 code-master5
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                v-2019-02