Error message and poster not saved
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Griffith |
New
|
Undecided
|
Unassigned |
Bug Description
Using postgresql, in the "Add a new movie" dialog, I successfuly pull information from imdb.
But when I hit "Add movie" an error message pops up:
insert or update on table "movies" violates foreign key constraint "movies_
DETAIL: Key (poster_
When I close that popup and then hit "Add movie" again, the movie is added but without its poster. The command line then shows:
2011-02-
Haven't looked at the code yet. Given that the second click doesn't have a problem with the primary key, probably needs a flush "inbetween" so that the primary key becomes available. The poster not being found I guess is just because the file gets deleted during the first attempt, probably assumed it was already put in the database.
There is something else also pointing to a timing/commit issue - maybe autocommit was turned off recently?
When a field value is too long - for example "Studio" has more than 128 characters, I get an error message on the command line (clicking "Add movie" seemingly does nothing)
2011-02-
In such a case I used to be able to just edit that field manually, and try again. In the current version though, a second attempt brings
Traceback (most recent call last):
File "/usr/bin/
add.
File "/usr/share/
if session.
[...]
File "/usr/lib/
"The transaction is inactive due to a rollback in a "
sqlalchemy.
http://
If someone encounters this error, a workaround is simply to fetch the information again. The poster will be saved fine the second time.