acoustid / mbdata

MusicBrainz SQLAlchemy Models
MIT License
97 stars 23 forks source link

Error running mbslave sync #59

Open Simon-Nemaura opened 1 year ago

Simon-Nemaura commented 1 year ago

I see the following error when running mbslave sync

% mbslave sync
INFO:mbdata.replication:Downloading https://metabrainz.org/api/musicbrainz/replication-155737.tar.bz2?token=***
Traceback (most recent call last):
  File "/Users/simonhopkin/.local/bin/mbslave", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/simonhopkin/.local/pipx/venvs/mbdata/lib/python3.11/site-packages/mbdata/replication.py", line 803, in main
    args.func(config, args)
  File "/Users/simonhopkin/.local/pipx/venvs/mbdata/lib/python3.11/site-packages/mbdata/replication.py", line 520, in mbslave_sync_main
    process_tar(packet, db, config, ignored_schemas, ignored_tables, schema_seq, replication_seq, hook)
  File "/Users/simonhopkin/.local/pipx/venvs/mbdata/lib/python3.11/site-packages/mbdata/replication.py", line 457, in process_tar
    logger.info("Processing %s", fileobj.name)
                                 ^^^^^^^^^^^^
AttributeError: 'HTTPResponse' object has no attribute 'name'

I installed mbdata using pipx:

pipx install 'mbdata[replication]'
nix234 commented 1 year ago

Exactly the same problem on FreeBSD also installed with pipx, init worked but sync gave me the same error:


Traceback (most recent call last):
  File "/usr/home/mbdata/.local/bin/mbslave", line 8, in <module>
    sys.exit(main())
  File "/usr/home/mbdata/.local/pipx/venvs/mbdata/lib/python3.9/site-packages/mbdata/replication.py", line 803, in main
    args.func(config, args)
  File "/usr/home/mbdata/.local/pipx/venvs/mbdata/lib/python3.9/site-packages/mbdata/replication.py", line 520, in mbslave_sync_main
    process_tar(packet, db, config, ignored_schemas, ignored_tables, schema_seq, replication_seq, hook)
  File "/usr/home/mbdata/.local/pipx/venvs/mbdata/lib/python3.9/site-packages/mbdata/replication.py", line 457, in process_tar
    logger.info("Processing %s", fileobj.name)
AttributeError: 'HTTPResponse' object has no attribute 'name'