Skip to content

Internal use of 'which' program raises exception under Windows #6

@piotr-dobrogost

Description

@piotr-dobrogost

When running this command
C:\Documents and Settings\pdobrogost>python c:\Python\2.7\Scripts\ve-init
I get this execption

Traceback (most recent call last):
  File "c:\Python\2.7\Scripts\ve-init", line 19, in <module>
    main(*sys.argv[1:])
  File "c:\Python\2.7\Scripts\ve-init", line 16, in main
    return vecmd.virtualenv(*args)
  File "c:\python\2.7\lib\site-packages\vecmd\commands.py", line 71, in virtualenv
    return script.python(script.which('virtualenv'), '-q', *args)
  File "c:\python\2.7\lib\site-packages\vecmd\script.py", line 127, in which
    return capture('which', *args).strip()
  File "c:\python\2.7\lib\site-packages\vecmd\script.py", line 105, in capture
    return subprocess.Popen(args, stdout=subprocess.PIPE).communicate()[0]
  File "c:\python\2.7\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "c:\python\2.7\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Printing args at line 105 of script.py shows vecmd tries to execute which program which is not available on Windows. On newer versions of Windows there's equivalent called where - see http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions