Paster Shell stopped working

52 views
Skip to first unread message

GogiJan

unread,
Jun 26, 2009, 3:08:04 PM6/26/09
to pylons-discuss
After installing dev pylons version, paster shell stopped working for
all pylons projects (including newly created).
$paster shell test.ini
Traceback (most recent call last):
File "/usr/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')
()
File "/usr/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/
paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/
paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/usr/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/
paste/script/command.py", line 218, in run
result = self.command()
File "/home/george/work/opros/pylons/hg/P/Pylons/pylons/
commands.py", line 485, in command
'response, session, tmpl_context, url') in locs
File "<string>", line 1, in <module>
ImportError: cannot import name c

GogiJan

unread,
Jul 8, 2009, 12:53:26 AM7/8/09
to pylons-discuss
Hello Alll.
If it would be helpful to anyone, the following patch made everything
work:

--- a/pylons/commands.py Tue May 12 19:02:50 2009 -0700
+++ b/pylons/commands.py Wed Jul 08 11:51:36 2009 +0700
@@ -481,7 +481,7 @@
if can_import(helpers_module):
locs['h'] = sys.modules[helpers_module]

- exec ('from pylons import app_globals, c, config, g, request,
'
+ exec ('from pylons import app_globals, config, request, '
'response, session, tmpl_context, url') in locs
exec ('from pylons.controllers.util import abort,
redirect_to') in locs
exec 'from pylons.i18n import _, ungettext, N_' in locs


For some reason, commands seemed to import c and g from pylons, though
there were no such globals defined.
Regards,
George Fatkin.
Reply all
Reply to author
Forward
0 new messages