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

Web import hiccup #48

Closed
lizdodd opened this issue Jan 12, 2014 · 6 comments
Closed

Web import hiccup #48

lizdodd opened this issue Jan 12, 2014 · 6 comments
Labels
Milestone

Comments

@lizdodd
Copy link

lizdodd commented Jan 12, 2014

Web import now fails with a missing database field

Message: Created directory: /data/images/2012/07/08/
Message: Created directory: /data/images/2012/07/08/mid/
Message: Created directory: /data/images/2012/07/08/thumb/

Insert failed:
Unknown column 'rating' in 'field list'

INSERT INTO zoph_photos(date, time, camera_make, camera_model, flash_used, focal_length, exposure, aperture, metering_mode, iso_equiv, compression, location_id, rating, photographer_id, description, path, name) VALUES ('2012-07-08', '18:54:21', 'Panasonic', 'Dmc-ls80', 'No', '5.5mm', '0.025 s (1/40) [program (auto)]', 'f/2.8', 'matrix', '1250', 'jpeg quality: fine', '263', '0', '3', 'Pogoplug', '2012/07/08', 'P1090853.JPG')

@lizdodd
Copy link
Author

lizdodd commented Jan 12, 2014

Trying now to follow up the error, I can't manually import
zoph --photographer "liz billiau" --field "mapzoom=12" --album "home" /data/images/uploads/P1090853.JPG
File already exists: /data/images/2012/07/08/P1090853.JPG
File already exists: /data/images/2012/07/08/P1090853.JPGPHP Fatal error: Uncaught exception 'FileExistsException' with message 'File already exists: /data/images/2012/07/08/P1090853.JPG' in /var/www/zoph/file.inc.php:211
Stack trace:
#0 /var/www/zoph/file.inc.php(222): file->checkCopy()
#1 /var/www/zoph/photo.inc.php(423): file->checkMove()
#2 /var/www/zoph/import.inc.php(112): photo->import(Object(file))
#3 /var/www/zoph/cli/cli.inc.php(230): Import::photos(Array, Array)
#4 /var/www/zoph/cli/cli.inc.php(75): cli->doImport()
#5 /usr/bin/zoph(95): cli->run()
#6 /usr/bin/zoph(62): init()
#7 {main}
thrown in /var/www/zoph/file.inc.php on line 211

but there is no database entry so I can't view it.

@jeroenrnl
Copy link
Owner

The first (webimport) problem you are describing is probably a leftover from the change that removed the rating field from the photo table, I'm investigating that now.
The second problem is caused by the photo you're trying to import already being in your images directory, due to the import breaking halfway the import process. If you doublecheck whether the photo is indeed still in the place where you're trying to import it from, you can delete it (and the mid_ and thumb_ files too) from the images dir. If it does no longer exist in the original location, you should move it back instead of deleting it.

@jeroenrnl
Copy link
Owner

I can't reproduce this on my system... which version are you using?

@lizdodd
Copy link
Author

lizdodd commented Jan 12, 2014

version is whatever i downloaded from git last week,
OS is Debian jessie/sid

@jeroenrnl
Copy link
Owner

I haven't made any changes that could fix this in the last few weeks, so there must be something else going on. I will try some more to reproduce this issue.

@jeroenrnl
Copy link
Owner

After a long search, I finally found the issue: I run several installations of Zoph and in a few of them, I have negected to delete the rating field from the photo database... this included both the version I used to test your bug and the one that automatically runs tests every night... I will now remove it in both and see what happens :-)

jeroenrnl added a commit that referenced this issue Jan 12, 2014
jeroenrnl added a commit that referenced this issue Jan 12, 2014
Fixed import when no rating has been given.

#48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants