acoustid / mbdata

MusicBrainz SQLAlchemy Models
MIT License
97 stars 23 forks source link

mbslave is wrong #26

Closed RankRao closed 3 years ago

RankRao commented 3 years ago

cat /etc/mbslave.conf

[database] host=127.0.0.1 port=5432 name=musicbrainz user=musicbrainz

password=

[musicbrainz] base_url=https://metabrainz.org/api/musicbrainz/ token=Eqzq...(this is my token)

[tables] ignore=

ignore=tracklist_index

[schemas] musicbrainz=musicbrainz statistics=statistics cover_art_archive=cover_art_archive event_art_archive=event_art_archive wikidocs=wikidocs documentation=documentation ignore=

ignore=statistics,cover_art_archive,wikidocs,documentation

when I work with step 5 Prepare empty schemas for the MusicBrainz database and create the table structure: echo 'CREATE SCHEMA musicbrainz;' | mbslave psql -S echo 'CREATE SCHEMA statistics;' | mbslave psql -S echo 'CREATE SCHEMA cover_art_archive;' | mbslave psql -S echo 'CREATE SCHEMA wikidocs;' | mbslave psql -S echo 'CREATE SCHEMA documentation;' | mbslave psql -S

mbslave psql -f CreateCollations.sql mbslave psql -f CreateTables.sql mbslave psql -f statistics/CreateTables.sql mbslave psql -f caa/CreateTables.sql mbslave psql -f wikidocs/CreateTables.sql mbslave psql -f documentation/CreateTables.sql

it get a wrong

[root@test pgsql]# echo 'CREATE SCHEMA musicbrainz;' | mbslave psql -S Traceback (most recent call last): File "/bin/mbslave", line 7, in from mbdata.replication import main File "/usr/lib/python2.7/site-packages/mbdata/replication.py", line 20, in from contextlib2 import ExitStack File "/usr/lib/python2.7/site-packages/contextlib2/init.py", line 56 async def aenter(self): ^ SyntaxError: invalid syntax

lalinsky commented 3 years ago

It seems that you have installed the latest version of contextlib2 (which required python 3) using python 2. If you don't know much about python packages, I suggest you use python 3 to install and run mbdata.