pasterscript-1.3.1 Error on Windows XP Using Python Version 2.5

0 views
Skip to first unread message

RobJ

unread,
Apr 2, 2007, 3:05:00 PM4/2/07
to pylons-discuss
Every time I run the following paster command:

paster serve --reload development.ini

I recive this traceback error:

C:\web-work\wapp>paster serve --reload development.ini
Starting subprocess with file monitor
Traceback (most recent call last):
File "C:\Python25\Scripts\paster-script.py", line 8, in <module>
load_entry_point('pastescript==1.3.1', 'console_scripts', 'paster')
()
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\c
ommand.py", line 76, in run
invoke(command, command_name, options, args[1:])
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\c
ommand.py", line 115, in invoke
exit_code = runner.run(args)
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\c
ommand.py", line 210, in run
result = self.command()
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\s
erve.py", line 154, in command
return self.restart_with_reloader()
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\s
erve.py", line 340, in restart_with_reloader
self.restart_with_monitor(reloader=True)
File "c:\python25\lib\site-packages\pastescript-1.3.1-py2.5.egg\paste
\script\s
erve.py", line 351, in restart_with_monitor
args[0] = '"%s"' % arg
NameError: global name 'arg' is not defined

Has anyone enconterd this ? I am using Windows XP and Python 2.5 with
version 9.4.1 any help would be apreciated.

- Rob

Philip Jenvey

unread,
Apr 2, 2007, 3:15:32 PM4/2/07
to pylons-...@googlegroups.com

On Apr 2, 2007, at 12:05 PM, RobJ wrote:

>
> Every time I run the following paster command:
>
> paster serve --reload development.ini
>
> I recive this traceback error:
>

> erve.py", line 351, in restart_with_monitor


> args[0] = '"%s"' % arg
> NameError: global name 'arg' is not defined
>
> Has anyone enconterd this ? I am using Windows XP and Python 2.5 with
> version 9.4.1 any help would be apreciated.
>

This was just reported:

http://trac.pythonpaste.org/pythonpaste/ticket/169

and it's fixed in trunk. easy_install -U PasteScript==dev will solve it.

Hopefully Ian will release 1.3.2 pretty soon.

--
Philip Jenvey


RobJ

unread,
Apr 2, 2007, 3:57:41 PM4/2/07
to pylons-discuss
Thanks for the information Phillip I will try this out.

Rob J

RobJ

unread,
Apr 4, 2007, 4:16:54 PM4/4/07
to pylons-discuss
Philip I update to PasteScript but PasteScript is still failing when I
run --reload. What seems to work is commenting out the If statement
for Windows:

-----------------------------------------------
if sys.platform == "win32":
args[0] = '"%s"' % args[0]
-----------------------------------------------


I haven't looked at the code closely so I'm not sure what the
consequences are of commenting out this code but everything seems to
work the way that it did with Python 2.4.


Rob J

On Apr 2, 3:15 pm, Philip Jenvey <pjen...@groovie.org> wrote:

Jose Galvez

unread,
Apr 4, 2007, 4:32:45 PM4/4/07
to pylons-...@googlegroups.com
What error do you get this time?
jose

Ian Bicking

unread,
Apr 4, 2007, 4:47:43 PM4/4/07
to pylons-...@googlegroups.com
RobJ wrote:
> Philip I update to PasteScript but PasteScript is still failing when I
> run --reload. What seems to work is commenting out the If statement
> for Windows:
>
> -----------------------------------------------
> if sys.platform == "win32":
> args[0] = '"%s"' % args[0]
> -----------------------------------------------
>
>
> I haven't looked at the code closely so I'm not sure what the
> consequences are of commenting out this code but everything seems to
> work the way that it did with Python 2.4.

I was under the impression that there was a longstanding bug in Windows
exec* functions (and subprocess) that the first argument required
quoting if it had spaces in it. Strictly speaking it shouldn't, as
those functions as well as the subprocess module take already-parsed
lists of arguments. The bug manifests itself if you install Python into
a directory with a space in it (e.g., Program Files), which is not the
default.

But perhaps this bug has been fixed? I'm guessing not in every version
of Python, or maybe not every API, or... I'm not sure. If anyone knows
the status of that bug, and maybe can doublecheck that it does or does
not exist in Python 2.4 and 2.5, I could put in a version check or
something.


--
Ian Bicking | ia...@colorstudy.com | http://blog.ianbicking.org
| Write code, do good | http://topp.openplans.org/careers

Dominique Eav

unread,
Apr 4, 2007, 9:35:38 PM4/4/07
to pylons-...@googlegroups.com
Jose Galvez wrote:
> What error do you get this time?


I'm getting the same error with python 2.4. Here is the console log :

Starting subprocess with file monitor
Traceback (most recent call last):

File "d:\Python24\Scripts\paster-script.py", line 7, in ?
sys.exit(
File
d:\python24\lib\site-packages\PasteScript-1.3.1-py2.4.egg\paste\script\command.py",

line 76, in run
invoke(command, command_name, options, args[1:])
File

"d:\python24\lib\site-packages\PasteScript-1.3.1-py2.4.egg\paste\script\command.py",

line 115, in invoke
exit_code = runner.run(args)
File

"d:\python24\lib\site-packages\PasteScript-1.3.1-py2.4.egg\paste\script\command.py",

line 210, in run
result = self.command()
File

"D:\Python24\lib\site-packages\pastescript-1.3.1-py2.4.egg\paste\script\serve.py",

line 154, in command
return self.restart_with_reloader()
File

"D:\Python24\lib\site-packages\pastescript-1.3.1-py2.4.egg\paste\script\serve.py",

line 340, in restart_with_reloader
self.restart_with_monitor(reloader=True)
File

"D:\Python24\lib\site-packages\pastescript-1.3.1-py2.4.egg\paste\script\serve.py",
line 362, in restart_with_monitor
proc = subprocess.Popen(args, env=new_environ)
File "d:\Python24\lib\subprocess.py", line 543, in __init__
errread, errwrite)
File "d:\Python24\lib\subprocess.py", line 706, in _execute_child
startupinfo)
WindowsError: [Errno 123] The filename, directory name, or volume label
syntax is incorrect


Line numbers in traceback may not be the same as yours because of added
log statements. The lines in cause are :

if sys.platform == "win32":
# patched (Changeset 6383),
# but still does not work for some reason :


args[0] = '"%s"' % args[0]

Here is what I have in my "args" variable :

['"D:\\Python24\\python.exe"', d:\\Python24\\Scripts\\paster-script.py',
'serve', '--reload', 'development.ini']

It works fine without those added quotes.

Are these added quotes useful with a blank space in the Python
installation path ? With no space (my case), it just seems to break the
script.

dom


Reply all
Reply to author
Forward
0 new messages