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

Issue replication database with mbdata(25.0.4) #22

Closed
mick-s9 opened this issue Aug 25, 2021 · 3 comments
Closed

Issue replication database with mbdata(25.0.4) #22

mick-s9 opened this issue Aug 25, 2021 · 3 comments

Comments

@mick-s9
Copy link

mick-s9 commented Aug 25, 2021

Hi,

I have recently joined the meta/musicbrainz community. For a few days, I have been facing troubles in the replication of Musicbrainz database (through Mbdata). Basically, following the guide there are no problems up to point 6, everything is fine; however, on point 7, where I should import dumps in the form of .tar files, I keep running into this error:

Importing data from mbdump.tar.bz2
 - Loading alternative_release_type to musicbrainz.alternative_release_type
Traceback (most recent call last):
  File "/home/manuel/.local/bin/mbslave", line 8, in
    sys.exit(main())
  File "/home/manuel/.local/lib/python3.9/site-packages/mbdata/replication.py", line 592, in main
    args.func(config, args)
  File "/home/manuel/.local/lib/python3.9/site-packages/mbdata/replication.py", line 253, in mbslave_import_main
    load_tar(filename, db, config, config.schemas.ignored_schemas, config.tables.ignored_tables)
  File "/home/manuel/.local/lib/python3.9/site-packages/mbdata/replication.py", line 245, in load_tar
    cursor.copy_from(tar.extractfile(member), fulltable)
psycopg2.errors.UndefinedTable: relation "musicbrainz.alternative_release_type" does not exist

If I check in the Postgres musicbrainz database, all the tables are available. Any advice on how to proceed? Thank you so much in advance.

@danada157
Copy link

I am having the same problem. I found the following recent issue with psycopg2 which I think could be the cause:

psycopg/psycopg2#1294

It seems that the copy_from() method in psycopg2 was recently updated to address security concerns and I think this is the line in the load_tar() function in replication.py that is causing this error on import.

@J-I-B
Copy link

J-I-B commented Oct 1, 2021

I agree. I had the same problem. Temporary solution is to downgrade psycopg2 to 2.8.6

@danada157
Copy link

I agree. I had the same problem. Temporary solution is to downgrade psycopg2 to 2.8.6

For newbies wondering how to do this it's really easy: pip install psycopg2==2.8.6

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

4 participants