All pastes #1023267 Raw Edit

Miscellany

public text v1 · immutable
#1023267 ·published 2008-05-19 22:42 UTC
rendered paste body
<type 'exceptions.UnboundLocalError'>	Python 2.5.1: /home/electron/bin/bin/python
Mon May 19 15:41:53 2008


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/.keerokee/electron/shinyshell.net/community/tools.py in ()
  174                         # update forum counters
  175                         Electron.countermanager.update_forum_counters(post["forumid"])
  176                         Electron.countermanager.update_topic_counters(post["topicid"])
  177                     
  178                     print "Status: 307 Temporary Redirect"
Electron = <module 'Electron' from '/home/electron/shinyshell.net/Electron/__init__.pyc'>, Electron.countermanager = <module 'Electron.countermanager' from '/home/electron/shinyshell.net/Electron/countermanager.pyc'>, Electron.countermanager.update_topic_counters = <function update_topic_counters at 0x405bc64c>, post = {'content': "Sorry Leccy Leccy, I just couldn't help but post...e time on this website you're creating, leccy. =3", 'dateline': 1211236003L, 'deleted': 0, 'deletememberid': 0L, 'forumid': 7, 'ipaddress': '76.240.60.132', 'postid': 45L, 'topicid': 10L, 'topictitle': '\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\xe3\x81\xaf', 'userid': 2L, ...}
 /home/electron/shinyshell.net/Electron/countermanager.py in update_topic_counters(topicid=10L)
  125             WHERE topicid = %s
  126             LIMIT 1
  127         """, (lastpost["userid"], lastpost["postid"], lastpost["dateline"], topicid))
  128         
  129         # recount deleted posts



<type 'exceptions.UnboundLocalError'>: local variable 'lastpost' referenced before assignment