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

Riiif image service broken if filenames contain a space #2271

Closed
benwbrum opened this issue Jan 13, 2021 · 5 comments · Fixed by #2279
Closed

Riiif image service broken if filenames contain a space #2271

benwbrum opened this issue Jan 13, 2021 · 5 comments · Fixed by #2279
Labels

Comments

@benwbrum
Copy link
Owner

A customer (William Woodruff project) reports:

Hi there, I am working with your IIIF API and I've noticed that several of the URLS for images in the project I'm working on are returning a 500 error.
Here is one example: https://fromthepage.com/image-service/1580519/full/full/0/default.jpg
and it's coming from this manifest: https://fromthepage.com/iiif/48048/manifest
Thanks in advance for your help!

@saracarl
Copy link
Collaborator

Error from logs:

I, [2021-01-14T14:35:41.392110 #19988]  INFO -- : Completed 500  in 39ms (ActiveRecord: 3.5ms | Allocations: 6311)
F, [2021-01-14T14:35:41.402293 #19988] FATAL -- :   
Riiif::ConversionError (Unable to execute command "identify -format '%h %w %m %[channels]' /home/fromthepage/deployment/releases/20210112155212/public//images/uploaded/48048/Letter-1879-10-16-D-p4-WW to N
ellie.jpg[0]"
identify: unable to open image `/home/fromthepage/deployment/releases/20210112155212/public//images/uploaded/48048/Letter-1879-10-16-D-p4-WW': No such file or directory @ error/blob.c/OpenBlob/2712.
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
identify: unable to open image `to': No such file or directory @ error/blob.c/OpenBlob/2712.
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
identify: unable to open image `Nellie.jpg': No such file or directory @ error/blob.c/OpenBlob/2712.
):

@saracarl
Copy link
Collaborator

This seems to be a problem with spaces in the filenames. The full filename is:
Letter-1879-10-16-D-p4-WW to Nellie.jpg
which is passed to the command, but the error says:
unable to open image ``/home/fromthepage/deployment/releases/20210112155212/public//images/uploaded/48048/Letter-1879-10-16-D-p4-WW': No such file or directory

@saracarl
Copy link
Collaborator

@benwbrum benwbrum changed the title Riiif image service broken Riiif image service broken if filenames contain a space Jan 14, 2021
@benwbrum
Copy link
Owner Author

A second problem here is that--while Riiif is using FromThePageFileResolver under Apache/Passenger--our development environments do not use that resolver, instead using the default resolver. As a result, we can't fix this in development until our Riiif initializer works again.

benwbrum added a commit that referenced this issue Jan 17, 2021
@benwbrum benwbrum linked a pull request Jan 17, 2021 that will close this issue
@benwbrum
Copy link
Owner Author

See sul-dlss/riiif#119 on the second issue.

benwbrum added a commit that referenced this issue Jan 17, 2021
sylvieed pushed a commit that referenced this issue Jul 14, 2022
sylvieed pushed a commit that referenced this issue Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants