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

Reference manifests in fixture collection produce error when making iiif service calls. #619

Closed
aeschylus opened this issue Dec 2, 2015 · 10 comments
Labels

Comments

@aeschylus
Copy link
Member

In http://iiif.io/api/presentation/2.0/example/fixtures/collection.json, manifests that have IIIF services return a server error page (500) when attempting to retrieve tiles.

For example: http://iiif.io/api/image/2.0/example/reference/page1-full/info.json in http://iiif.io/api/presentation/2.0/example/fixtures/29/manifest.json returns an error page or a 500 when requested with Ajax.

We're currently validating a JS API we're building for rendering multi-image objects (choice, detail, etc.) in OSD, and would like to use these in our testing. Is there a IIIF service that will respond to requests for tiles?

@azaroth42
Copy link
Member

Works for me? Can you try again?
If it still errors, can you provide a curl or wget command that can be used to duplicate the requests you're making?

@azaroth42
Copy link
Member

Still WFM. Propose Close Invalid.

@jpstroop
Copy link
Member

jpstroop commented Dec 9, 2015

@aeschylus can you put up a Gist w/ your AJAX code?

@aeschylus
Copy link
Member Author

The Ajax request is the one sent by OpenSeadragon. So https://github.com/openseadragon/openseadragon/blob/master/src/tilesource.js#L446-L506

It seems to work now, but I was getting Python error pages.

@aeschylus
Copy link
Member Author

I suppose that means this can be closed, but it would be good to consult the logs for the iiif service to see what happened.

@aeschylus
Copy link
Member Author

This happened again today.

Attempting to retrieve http://iiif.io/api/image/2.0/example/reference/page1-full/info.json yields the following error page:

-- > -- >




    < type 'exceptions.IOError' > Python 2.6.6: /usr/bin / pythonWed Dec 16 18: 25: 14 2015

 A problem occurred in a Python script.Here is the sequence of

 function calls leading up to the error,
 in the order they occurred.

   / home / iiif / Web / scripts / image / 2.0 / pi3f.py in __call__(self = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > , environ = {
     'DOCUMENT_ROOT': '/home/iiif/Web/iiif_root',
     'GATEWAY_INTERFACE': 'CGI/1.1',
     'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
     'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
     'HTTP_ACCEPT_LANGUAGE': 'en-GB,en;q=0.8,en-US;q=0.6,fr-FR;q=0.4,fr;q=0.2',
     'HTTP_CONNECTION': 'keep-alive',
     'HTTP_COOKIE': '_ga=GA1.2.572469954.1447350312',
     'HTTP_HOST': 'iiif.io',
     'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
     'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) ...ML, like Gecko) Chrome/46.0.2490.86 Safari/537.36',
     ...
 }, start_response = < built - in method start_response of mod_wsgi.Adapter object > )   111 

    112         
 try:

   113              data  =  self.handle()

    114          except:

   115              sio  =  StringIO.StringIO()

 data undefined,
 self  = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > ,
 self.handle  = < bound method ServiceHandler.handle of < _mod_wsg...37eb0a3f6026c5f4042adf0.ServiceHandler instance >>

  /home/iiif / Web / scripts / image / 2.0 / pi3f.py in handle(self = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > )   288 

    289         
 if  method  ==  "GET":

   290             
 return  self.handle_GET();


 291          elif  not  UPLOADS:

   292             
 return  self.error(405)

 self  = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > ,
 self.handle_GET  = < bound method ServiceHandler.handle_GET of < _mod...37eb0a3f6026c5f4042adf0.ServiceHandler instance >>

  /home/iiif / Web / scripts / image / 2.0 / pi3f.py in handle_GET(self = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > )   467                     
 if  not  os.path.exists(infoId  + '/' + region):

   468                          image  =  Image.open(filename)

    469                          self.make_info(infoId,  image)

    470                         
 try:

   471                              image.close()

 self  = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > ,
 self.make_info  = < bound method ServiceHandler.make_info of < _mod_...37eb0a3f6026c5f4042adf0.ServiceHandler instance >> ,
 infoId  = 'page1-full',
 image  = < PIL.PngImagePlugin.PngImageFile image mode = RGBA size = 1200x1800 >

  /home/iiif / Web / scripts / image / 2.0 / pi3f.py in make_info(self = < _mod_wsgi_904eb158437eb0a3f6026c5f4042adf0.ServiceHandler instance > , infoId = 'page1-full', image = < PIL.PngImagePlugin.PngImageFile image mode = RGBA size = 1200x1800 > )   271             #  directory  already  exists

    272              pass

    273          fh  =  file(infoId + '/info.json',  'w')

    274          fh.write(data)

    275          fh.close()       

 fh undefined,
 builtin file  = < type 'file' > ,
 infoId  = 'page1-full' < type 'exceptions.IOError' > : [Errno 2] No such file or directory: 'page1-full/info.json'      
 args  = (2, 'No such file or directory')       errno  = 2       filename  = 'page1-full/info.json'      
 message  = ''      
 strerror  = 'No such file or directory'

@azaroth42
Copy link
Member

Ahha, got it. It's a race condition with /other/ code using the same VM and changing the working directory out of where the image server is looking for the cache. :(
I need to deploy latest version that doesn't have this race, and upgrade previous versions of the image server to do the same. I guess I get to test out the 'required review' process in SUL-DLSS ;)

@aeschylus
Copy link
Member Author

Excellente!

Jon: https://github.com/openseadragon/openseadragon/blob/master/src/tilesource.js#L446-L506 is what openSeadragon was using. But this was happening when I just clicked the link.

Also, unrelated, but I saw some interesting things during my 2 hours wandering around Amsterdam before my flight:

img_2668
img_2672

@jpstroop
Copy link
Member

👍

@azaroth42
Copy link
Member

Closing on iiif.io after making issue on the server implementation.

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

3 participants