KeyError in forums

Bug #1291288 reported by Paul Everitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Won't Fix
Low
Tres Seaver

Bug Description

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'

Revision history for this message
Tres Seaver (tseaver) wrote :

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.

Changed in karl3:
status: New → In Progress
Changed in karl3:
milestone: m134 → m135
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Moving to April.

Changed in karl3:
milestone: m135 → m136
Revision history for this message
Tres Seaver (tseaver) wrote :

I'm dropping the priority here until we have either a way to reproduce this report reliably or reports of it as an ongoing issue.

Changed in karl3:
importance: Medium → Low
status: In Progress → Confirmed
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

I will close this, as it hasn't come up again and thus doesn't justify budget.

Changed in karl3:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.