Title: Message
I received the following error when hitting the SAVE button on the templates page.  This error occurs when the bounce.txt file does not exist, and no text is added to the TEXTAREA box.  If I add text to the bounce.txt box or if the bounce.txt file exists the save function works just fine.  I have not tested to see if this error or a similar one occurs when any of the other template files are missing.
 
Perhaps it would be advantageous to have TMDA-CGI grab the global template when a template file does not exist in a users template directory.  It might also be nice to have a button to delete a specific template file and revert to the global template.  Even better would be the ability to browse the templates directory and manage any template file in the directory with the ability to add/copy/delete/move/rename template files.  This would better facilitate the use of custom user/domain and bounce/confirm templates.
 
Thanks for the great product Gre7g,
 
Dave Grimberg

It is by caffeine alone that I set my mind in motion; It is by the beans of Java that my thoughts acquire speed; the hands acquire shakes, the shakes become a warning; It is by caffeine alone that I set my mind in motion.

 
KeyError Python 2.2.2: /usr/bin/python2.2
Wed Oct 22 11:03:14 2003

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/tmda-cgi/tmda-cgi.py
  173   elif Cmd == "templates":
  174     import Templates
  175     Call(Templates)
  176   elif Cmd == "test_addr":
  177     import TestAddr
Call = <function Call>, Templates = <module 'Templates' from 'Templates.pyc'>

 /var/www/tmda-cgi/tmda-cgi.py in Call(Library=<module 'Templates' from 'Templates.pyc'>, Str=None)
   55     Library.Show(Str)
   56   else:
   57     Library.Show()
   58 
   59 # Capture WebUID
Library = <module 'Templates' from 'Templates.pyc'>, Library.Show = <function Show>

 /var/www/tmda-cgi/Templates.py in Show()
   67       try:
   68         # Make sure the list is properly formatted
   69         FileContents = re.sub("\r\n", "\n", Form[BaseName].value)
   70         FileContents = re.sub("\n*$", "", FileContents)
   71         FileContents += "\n"
FileContents = '', global re = <module 're' from '/usr/lib/python2.2/re.pyc'>, re.sub = <function sub>, global Form = FieldStorage(None, None, [MiniFieldStorage('conf...emplates'), MiniFieldStorage('SID', 'X7HeywbX')]), BaseName = 'bounce', ].value undefined

 //usr/lib/python2.2/cgi.py in __getitem__(self=FieldStorage(None, None, [MiniFieldStorage('conf...emplates'), MiniFieldStorage('SID', 'X7HeywbX')]), key='bounce')
  548             if item.name == key: found.append(item)
  549         if not found:
  550             raise KeyError, key
  551         if len(found) == 1:
  552             return found[0]
KeyError undefined, key = 'bounce'

KeyError: bounce
      __doc__ = 'Mapping key not found.'
      __getitem__ = <bound method KeyError.__getitem__ of <exceptions.KeyError instance>>
      __init__ = <bound method KeyError.__init__ of <exceptions.KeyError instance>>
      __module__ = 'exceptions'
      __str__ = <bound method KeyError.__str__ of <exceptions.KeyError instance>>
      args = ('bounce',)

_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to