On Tue, Jul 06, 2010 at 07:53:04AM +0530, b vivek wrote:
> Hi can I have a look at the search_function  of
> /usr/lib/python2.6/encodings/__init__.py.

Here you go: http://pastebin.com/KUrcs1Qh

As far as I know, it's stock with my Python distribution.  The
exception in the traceback occurs on line 30 of the paste above.

Ross


> On Mon, Jul 5, 2010 at 11:00 PM, Ross Vandegrift <[email protected]> wrote:
> 
> > Hey everyone,
> >
> > Looks like Debian recently changed the system python to python2.6, so
> > I'm taking this chance to update my app to make sure there aren't any
> > issues.
> >
> > When I hit a page via "paster serve ..." I get a weird exception from
> > imports in WebError.  Has anyone seen this?  I can't be the first
> > person to try to run on python2.6!  I tried rolling back to WebError
> > 0.10.1 (which I was using without issue on python2.5), but it didn't
> > help.
> >
> > Thanks,
> > Ross
> >
> > Exception happened during processing of request from ('127.0.0.1', 39433)
> > Traceback (most recent call last):
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/httpserver.py",
> > line 1068, in process_request_in_thread
> >    self.finish_request(request, client_address)
> >  File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
> >    self.RequestHandlerClass(request, client_address, self)
> >  File "/usr/lib/python2.6/SocketServer.py", line 617, in __init__
> >    self.handle()
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/httpserver.py",
> > line 442, in handle
> >    BaseHTTPRequestHandler.handle(self)
> >  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
> >    self.handle_one_request()
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/httpserver.py",
> > line 437, in handle_one_request
> >    self.wsgi_execute()
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/httpserver.py",
> > line 287, in wsgi_execute
> >    self.wsgi_start_response)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/cascade.py",
> > line 130, in __call__
> >    return self.apps[-1](environ, start_response)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Paste-1.7.4-py2.6.egg/paste/registry.py",
> > line 375, in __call__
> >    app_iter = self.application(environ, start_response)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.7-py2.6.egg/pylons/middleware.py",
> > line 201, in __call__
> >    self.app, environ, catch_exc_info=True)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.7-py2.6.egg/pylons/util.py",
> > line 94, in call_wsgi_application
> >    app_iter = application(environ, start_response)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/evalexception.py",
> > line 235, in __call__
> >    return self.respond(environ, start_response)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/evalexception.py",
> > line 483, in respond
> >    return debug_info.content()
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/evalexception.py",
> > line 539, in content
> >    self.base_path, self.counter, self.libraries)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/evalexception.py",
> > line 657, in format_eval_html
> >    short_er, extra_data = short_formatter.format_collected_data(exc_data)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/formatter.py",
> > line 73, in format_collected_data
> >    importance, title, value)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/formatter.py",
> > line 345, in format_extra_data
> >    return self.zebra_table(title, value)
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/formatter.py",
> > line 377, in zebra_table
> >    % self.quote(title)]
> >  File
> > "/usr/local/lib/python2.6/dist-packages/WebError-0.10.2-py2.6.egg/weberror/formatter.py",
> > line 295, in quote
> >    s = s.encode('latin1', 'htmlentityreplace')
> >  File "/usr/lib/python2.6/encodings/__init__.py", line 100, in
> > search_function
> >    level=0)
> > TypeError: import_module() got an unexpected keyword argument 'level'
> > ----------------------------------------
> >
> >
> > --
> > Ross Vandegrift
> > [email protected]
> >
> > "If the fight gets hot, the songs get hotter.  If the going gets tough,
> > the songs get tougher."
> >        --Woody Guthrie
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.9 (GNU/Linux)
> >
> > iEYEARECAAYFAkwyFscACgkQMlMoONfO+HAufQCgwDhpOxPjgfqcquy2C2YBMsHs
> > yQ0AoIkPgng0SvRK13OChhkUUZDnYlHP
> > =fqqQ
> > -----END PGP SIGNATURE-----
> >
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" 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/pylons-discuss?hl=en.
> 

-- 
Ross Vandegrift
[email protected]

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
        --Woody Guthrie

Attachment: signature.asc
Description: Digital signature

Reply via email to