KeyError: u'd909d807-310e-40b3-a3ab-f3b4436394ab'
Exception when processing https://karl.soros.org/offices/osiwa/forums/osiwa-news/add_forum_topic.html
Referer: https://karl.soros.org/offices/osiwa/forums/osiwa-news/add_forum_topic.html
Traceback (most recent call last):
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/tweens.py", line 17, in excview_tween
response = handler(request)
File "/srv/osfkarl/production/39/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 107, in tm_tween
return response
File "/srv/osfkarl/production/39/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 75, in __exit__
return self._retry_or_raise(t, v, tb)
File "/srv/osfkarl/production/39/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 60, in _retry_or_raise
reraise(t, v, tb) # otherwise reraise the exception
File "/srv/osfkarl/production/39/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 100, in tm_tween
response = handler(request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/router.py", line 153, in handle_request
response = view_callable(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 523, in __call__
return view(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 266, in attr_view
return view(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 239, in predicate_wrapper
return view(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 186, in _secured_view
return view(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 292, in rendered_view
result = view(context, request)
File "/srv/osfkarl/production/39/eggs/pyramid_formish-0.2a1-py2.6.egg/pyramid_formish/zcml.py", line 171, in __call__
return submitted(request, form, controller, self.action, controller)
File "/srv/osfkarl/production/39/eggs/pyramid_formish-0.2a1-py2.6.egg/pyramid_formish/zcml.py", line 210, in submitted
result = getattr(controller, handler)(converted)
File "/srv/osfkarl/production/39/eggs/karl-3.120-py2.6.egg/karl/content/views/forum.py", line 627, in handle_submit
relocate_temp_images(topic, request)
File "/srv/osfkarl/production/39/eggs/karl-3.120-py2.6.egg/karl/utilities/image.py", line 86, in relocate_temp_images
doc.text = TMP_IMG_RE.sub(relocate, doc.text)
File "/srv/osfkarl/production/39/eggs/karl-3.120-py2.6.egg/karl/utilities/image.py", line 73, in relocate
image = tempfolder[tempid]
File "/srv/osfkarl/production/39/eggs/repoze.folder-0.6.2-py2.6.egg/repoze/folder/__init__.py", line 96, in __getitem__
return self.data[name]
KeyError: u'd909d807-310e-40b3-a3ab-f3b4436394ab'
That traceback indicates that the image was already gone from the TempFolder. Hypothesis:
- The user started to create the forum post, adding one or more images
- The user got distracted (or needed more information to complete the post), leaving the add
view sitting in the browser for 24+ hours.
- By the time the user returned to post the form, another user had triggered the 'cleanup()'
method on the temp folder, removing the older-than-24-hours image.