research-engine
research-engine copied to clipboard
Error while uploading a png image
Here is the tracelog, I'm still not sure how to reproduce it since I can upload images without any problem.
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/generic.py", line 278, in dispatch
webapp2.RequestHandler.dispatch(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/images.py", line 56, in get
self.render("images_main.html", project = project, user = user, images = images)
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/images.py", line 44, in render
projects.ProjectPage.render(images_tab_class = "active", *a, **kw)
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/generic.py", line 260, in render
self.write(self.render_str(template, **kw))
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/generic.py", line 250, in render_str
return render_str(template, **params)
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/generic.py", line 37, in render_str
return t.render(params)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/jinja2-2.6/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/../templates/images_main.html", line 1, in top-level template code
{% extends "project_base.html" %}
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/../templates/project_base.html", line 1, in top-level template code
{% extends "base.html" %}
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/../templates/base.html", line 97, in top-level template code
{% block content %}
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/../templates/project_base.html", line 69, in block "content"
{% block p_content %}
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/../templates/images_main.html", line 46, in block "p_content"
<img class="img-thumbnail" src="{{i.url()}}" />
File "/base/data/home/apps/s~research-engine/1-4-0.388652561949696230/src/images.py", line 28, in url
return images.get_serving_url(self.image_key) + "=s" + str(size)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1794, in get_serving_url
return rpc.get_result()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
return self.__get_result_hook(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1892, in get_serving_url_hook
raise _ToImagesError(e, readable_blob_key)
TransformationError
Might be related to this issue: https://code.google.com/p/googleappengine/issues/detail?id=8601
aaand this issue: https://code.google.com/p/googleappengine/issues/detail?id=11455
I get this same error while uploading files (e.g. pdf) that are not images. Maybe I should just try to catch the TransformationError
and display a dummy image in that case...
Here is the traceback:
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/generic.py", line 278, in dispatch
webapp2.RequestHandler.dispatch(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/images.py", line 56, in get
self.render("images_main.html", project = project, user = user, images = images)
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/images.py", line 44, in render
projects.ProjectPage.render(images_tab_class = "active", *a, **kw)
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/generic.py", line 260, in render
self.write(self.render_str(template, **kw))
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/generic.py", line 250, in render_str
return render_str(template, **params)
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/generic.py", line 37, in render_str
return t.render(params)
File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/jinja2-2.6/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/../templates/images_main.html", line 1, in top-level template code
{% extends "project_base.html" %}
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/../templates/project_base.html", line 1, in top-level template code
{% extends "base.html" %}
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/../templates/base.html", line 97, in top-level template code
{% block content %}
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/../templates/project_base.html", line 69, in block "content"
{% block p_content %}
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/../templates/images_main.html", line 46, in block "p_content"
<img class="img-thumbnail" src="{{i.url()}}" />
File "/base/data/home/apps/s~research-engine/1-4-0.389789130547309080/src/images.py", line 28, in url
return images.get_serving_url(self.image_key) + "=s" + str(size)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1794, in get_serving_url
return rpc.get_result()
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 613, in get_result
return self.__get_result_hook(self)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/images/__init__.py", line 1892, in get_serving_url_hook
raise _ToImagesError(e, readable_blob_key)
TransformationError