"self.form" missing, causing traceback emails

"Hancock, David (DHANCOCK)" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
I receive emails with Roundup tracebacks, and in recent weeks, I started getting numerous emails similar to the one below my signature. Has anybody else seen these? I modified cgi/client.py to eliminate MOST of them (diffs are further down the email). I didn't like doing that, but I was getting multiple emails, it seemed, for every tracker submission or change. Interestingly, the submissions and changes were and are working.

I apologize for not having the Roundup version number handy; I'm not sure where to find it. This particular installation was done in February 2012.

Cheers!
--
David Hancock | [email protected]

Traceback


TypeError: not indexable        Python 2.6
/usr/bin/python

A problem occurred while running a Python script. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call first. The exception attributes are:

/usr/lib/python2.6/cgi.py<cid:2DB4305B-79AE-4281-80C5-38EBAF01B215> in __contains__(self=FieldStorage(None, None, ''), key=':action')

  593         """Dictionary style __contains__ method."""
  594         if self.list is None:

  595             raise TypeError, "not indexable"


      global TypeError = undefined
  596         return any(item.name == key for item in self.list)
  597

/usr/lib/python2.6/site-packages/roundup/cgi/client.py<file:///usr/lib/python2.6/site-packages/roundup/cgi/client.py> in check_anonymous_access(self=<roundup.cgi.client.Client instance>)

  725         # that "register" has its own "Register" permission check)
  726

  727         if ':action' in self.form:


      self = <roundup.cgi.client.Client instance>, global form = undefined
  728             action = self.form[':action']
  729         elif '@action' in self.form:

/usr/lib/python2.6/site-packages/roundup/cgi/client.py<file:///usr/lib/python2.6/site-packages/roundup/cgi/client.py> in inner_main(self=<roundup.cgi.client.Client instance>)

  446                 # Roundup's real web interface (not a file being served up)
  447                 # so do the Anonymous Web Acess check now

  448                 self.check_anonymous_access()


      self = <roundup.cgi.client.Client instance>, global check_anonymous_access = undefined
  449
  450                 # possibly handle a form submit action (may change self.classname



Environment Variables
CONTENT_LENGTH  '0'
DOCUMENT_ROOT   '/var/www/html'
GATEWAY_INTERFACE       'CGI/1.1'
HTTP_CONNECTION 'Keep-Alive'
HTTP_HOST       'feedback.arincdirect.net'
HTTP_USER_AGENT 'Microsoft Office Protocol Discovery'
MOD_AUTH_TKT_CONF       '/etc/httpd/conf.d/02_auth_tkt.conf'
PATH    '/bin:/usr/bin:/sbin:/usr/sbin'
PATH_INFO       ''
PATH_TRANSLATED '/var/www/html/'
QUERY_STRING    ''
REMOTE_ADDR     '10.243.21.49'
REMOTE_PORT     '63092'
REQUEST_METHOD  'OPTIONS'
REQUEST_URI     '/support/'
SCRIPT_FILENAME '/var/www/roundup/trackers/support/dummy.py'
SCRIPT_NAME     '/support'
SCRIPT_URI      'http://feedback.arincdirect.net/support/'
SCRIPT_URL      '/support/'
SERVER_ADDR     '172.20.1.29'
SERVER_ADMIN    '[email protected]<mailto:'[email protected]>'
SERVER_NAME     'feedback.arincdirect.net'
SERVER_PORT     '80'
SERVER_PROTOCOL 'HTTP/1.1'
SERVER_SIGNATURE        ''
SERVER_SOFTWARE 'Apache'
UNIQUE_ID       'U44k2qwUAR0AACw@EhgAAAAK'


=================================================================

root@bswf01 cgi]# diff -Naur client.py.save20140529 client.py
--- client.py.save201405292014-05-29 15:42:38.000000000 +0000
+++ client.py2014-05-29 16:09:09.000000000 +0000
@@ -587,12 +587,7 @@
         """
         # look for client charset
         charset_parameter = 0
-        if '@charset' in self.form:
-            charset = self.form['@charset'].value
-            if charset.lower() == "none":
-                charset = ""
-            charset_parameter = 1
-        elif 'roundup_charset' in self.cookie:
+        if 'roundup_charset' in self.cookie:
             charset = self.cookie['roundup_charset'].value
         else:
             charset = None
@@ -644,12 +639,7 @@
         # look for language parameter
         # then for language cookie
         # last for the Accept-Language header
-        if "@language" in self.form:
-            language = self.form["@language"].value
-            if language.lower() == "none":
-                language = ""
-            self.add_cookie("roundup_language", language)
-        elif "roundup_language" in self.cookie:
+        if "roundup_language" in self.cookie:
             language = self.cookie["roundup_language"].value
         elif self.instance.config["WEB_USE_BROWSER_LANGUAGE"]:
             hal = self.env.get('HTTP_ACCEPT_LANGUAGE')

@@ -831,16 +821,18 @@

         # see if a template or messages are specified
         template_override = ok_message = error_message = None
-        for key in self.form:
-            if self.FV_TEMPLATE.match(key):
-                template_override = self.form[key].value
-            elif self.FV_OK_MESSAGE.match(key):
-                ok_message = self.form[key].value
-                ok_message = clean_message(ok_message)
-            elif self.FV_ERROR_MESSAGE.match(key):
-                error_message = self.form[key].value
-                error_message = clean_message(error_message)
-
+        try:
+            for key in self.form:
+                if self.FV_TEMPLATE.match(key):
+                    template_override = self.form[key].value
+                elif self.FV_OK_MESSAGE.match(key):
+                    ok_message = self.form[key].value
+                    ok_message = clean_message(ok_message)
+                elif self.FV_ERROR_MESSAGE.match(key):
+                    error_message = self.form[key].value
+                    error_message = clean_message(error_message)
+        except TypeError:
+            pass
         # see if we were passed in a message
         if ok_message:
             self.ok_message.append(ok_message)

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech

_______________________________________________
Roundup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.