ryanfb / iiif-dl

Command-line tile downloader/assembler for IIIF endpoints/manifests
MIT License
31 stars 2 forks source link

No such file or directory @ rb_sysope #11

Closed jsbien closed 4 years ago

jsbien commented 4 years ago

docker run -t -v $(pwd):/data ryanfb/iiif-dl manifest.json gives Parsing manifest JSON... Traceback (most recent call last): 1: from /usr/src/app/iiif-dl.rb:198:in

' /usr/src/app/iiif-dl.rb:198:in read': No such file or directory @ rb_sysopen - manifest.json (Errno::ENOENT) `

BTW, I had to install and to run the docker as a root: docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create: dial unix /var/run/docker.sock: connect: permission denied.

As you may guess, I don't know docker and follow the instructions blindly.

ryanfb commented 4 years ago

It looks like you don't have a file named manifest.json in the directory where you're running the docker command. You need to download a IIIF manifest JSON file and have it in the directory for iiif-dl to download.

jsbien commented 4 years ago

You're right. I switched to root with root - and didn't notice it changed the current directory. Now I have a different error: Traceback (most recent call last): usr/src/app/iiif-dl.rb:208:in

': undefined method each' for nil:NilClass (NoMethodError) PS. How to quote correctly multiline code?

ryanfb commented 4 years ago

It looks like whatever manifest JSON you're trying to download doesn't have any sequences defined. I suspect it may not be a IIIF manifest but some other JSON used by a viewer.

jsbien commented 4 years ago

The file is not used by any viewer, at least to the best of my knowledge. If is offered to download as "IFFF manifest" by the Polish national library POLONA, cf. e.g. the right top corner of https://polona.pl/item/orthographia-seu-modus-recte-scribendi-legendi-polonicu-idioma-q-utilissimus,NzM3OTQzMzA/4/#info:metadata. Your link points to IIIF Presentation API 2.0, Latest Stable Version is 3.0.0. A search there for "sequence" finds in particular: If there is no Range that has the behavior value sequence, and the Manifest does not have the behavior value unordered, then the client should treat the order of the Canvases in the Manifest’s items array as the default order. Are you absolutely sure the POLONA manifests are illegal?

ryanfb commented 4 years ago

Ah, I wasn't aware 3.0 wasn't backwards-compatible in this way. I've opened a separate issue for 3.0 support. Thanks for bringing it to my attention!

jsbien commented 4 years ago

Thanks!