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

20250101 and 20241201 Dump Release track artist has artists without id causing issue #154

Open
ijabz opened this issue Jan 24, 2025 · 1 comment

Comments

@ijabz
Copy link
Collaborator

ijabz commented Jan 24, 2025

Release track artist has artists without id causing issue

Traceback (most recent call last):
  File "postgresql/importcsv.py", line 42, in <module>
    load_csv(os.path.abspath(filename), db)
  File "postgresql/importcsv.py", line 33, in load_csv
    cursor.copy_expert(q, fp)
psycopg2.errors.NotNullViolation: null value in column "artist_id" violates not-null constraint
DETAIL:  Failing row contains (220, 278, 56, 10, null, Demopoulos, t, null, 2, null, Written By, null).
CONTEXT:  COPY release_track_artist, line 221: "56,10,278,,Demopoulos,1,,2,,Written By,"
@ijabz
Copy link
Collaborator Author

ijabz commented Jan 24, 2025

Remove with

grep -E "^[0-9]+,[0-9]+,[0-9]+,," -v release_track_artist.csv > release_track_artist.tmp; rm release_track_artist.csv; mv release_track_artist.tmp release_track_artist.csv

@ijabz ijabz changed the title 20250101 Release track artist has artists without id causing issue 20250101 and 20241201 Dump Release track artist has artists without id causing issue Jan 26, 2025
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

1 participant