iftekharjoy / webapp-improved

Automatically exported from code.google.com/p/webapp-improved
Other
0 stars 0 forks source link

NameError: global name 'app' is not defined #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On version webapp2-2.2 running python 2.6.1 OSX.  I kept getting this error 
when running a simple app.

handlers.CGIHandler().run(app)
NameError: global name 'app' is not defined

So I modified webapp2.py from

1580         else: # pragma: no cover
1581             handlers.CGIHandler().run(app)

to

1580         else: # pragma: no cover
1581             handlers.CGIHandler().run(self)

and it worked.  Looking at previous versions, run is passed with 'self' instead 
of 'app'.

Original issue reported on code.google.com by a...@wongz.org on 31 Jul 2011 at 7:55

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 20466bf3cfff.

Original comment by rodrigo.moraes on 1 Aug 2011 at 9:03