On Dec 6, 2007, at 1:10 PM, Florent Aide wrote:

>
> On Dec 6, 2007 9:44 PM, Fred C <[EMAIL PROTECTED]> wrote:
>>
>>
>> I don't have the problem anymore. After my first email I ran "tg- 
>> admin
>> update" on my project and everything seems to works now.
>
> I am still interested to see what was the request you tried that made
> the "before_main" filter to bork-out... Could you give us more info
> about this?


Ok Florent, I am back with that problem.

On one of my production machines I have that problem and I don't know  
how to fix it.
The same programs works fine now on my dev machine but fail with that  
error on my prod machine.

Here is the traceback I get.

2007-12-11 08:40:06,874 cherrypy.msg INFO HTTP: Traceback (most recent  
call last):
   File "/usr/local/lib/python2.5/site-packages/CherryPy-2.2.1- 
py2.5.egg/cherrypy/_cphttptools.py", line 103, in _run
     applyFilters('before_main')
   File "/usr/local/lib/python2.5/site-packages/CherryPy-2.2.1- 
py2.5.egg/cherrypy/filters/__init__.py", line 151, in applyFilters
     method()
   File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4b3- 
py2.5.egg/turbogears/visit/api.py", line 223, in before_main
     cherrypy.request.params = encode_utf8(cherrypy.request.params)
   File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.4b3- 
py2.5.egg/turbogears/visit/api.py", line 187, in encode_utf8
     res[k] = v.encode('utf-8')
   File "/usr/local/lib/python2.5/cgi.py", line 548, in __getattr__
     raise AttributeError, name
AttributeError: encode


Here is the beginning of the method, but TG fail before it gets to  
call it.

     @expose(template="caf.templates.sent")
     @validate(validators=TXfileValidator())
     @error_handler(index)
     def send(self, **kw):
         # save the filename
         filelen =  int(request.wsgi_environ['HTTP_CONTENT_LENGTH'])
         if filelen > MAX_FILESIZE:
             return dict(tg_template="caf.templates.message",
                         msg_class="error",
                         message=toobig + "  (%s)" % MAX_FILESIZE )

         uf = kw['file']
         .......




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to