J
J
JRazor2014-02-01 14:38:14
Python
JRazor, 2014-02-01 14:38:14

Python HgApi and Mercurial: WindowsError

Hello. There was a problem with HgApi. When accessing the directory, a WindowsError occurs. I looked for examples of accessing the repository, but did not find it.
Code (short and to the point):

import hgapi

repo = hgapi.Repo(r"J:\any\odesk_pil")
repo.hg_init()

Mistake:
Traceback (most recent call last):
  File "C:/Users/Eugene/PycharmProjects/odesk/Mercurial3k/mercurial.py", line 6, in <module>
    repo.hg_init()
  File "C:\Python32\lib\site-packages\hgapi-1.6.0-py3.2.egg\hgapi\hgapi.py", line 96, in hg_init
  File "C:\Python32\lib\site-packages\hgapi-1.6.0-py3.2.egg\hgapi\hgapi.py", line 92, in hg_command
  File "C:\Python32\lib\site-packages\hgapi-1.6.0-py3.2.egg\hgapi\hgapi.py", line 69, in command
  File "C:\Python32\lib\subprocess.py", line 744, in __init__
    restore_signals, start_new_session)
  File "C:\Python32\lib\subprocess.py", line 977, in _execute_child
    startupinfo)
WindowsError: [Error 2] Не удается найти указанный файл

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JRazor, 2014-02-01
@JRazor

Issue resolved and closed.
The problem was in PATH. Decision:

os.environ['PATH'] += ";C:\Program Files\Mercurial" # В моем случае - os.getcwd()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question