JRazor
JRazor

Reputation: 2817

Python HgApi and Mercurial: WindowsError

There is a problem with HgApi. When accessing a directory, an error occurs WindowsError. Look for examples of the treatment to the repository, but not found. The folder exists, I'm sure.

Code:

import hgapi

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

Error:

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] Не удается найти указанный файл

Upvotes: 0

Views: 230

Answers (1)

Ricardo C&#225;rdenes
Ricardo C&#225;rdenes

Reputation: 9172

I just installed the whole Mercurial + HgApi on a Windows XP virtual machine I've got here and it works without problems, which leads me to think that either:

  • You haven't got Mercurial installed in your computer; or
  • Mercurial (the hg program) is not on the $PATH

If you installed Mercurial using the official Windows package, the latter shouldn't be a problem, though.

Upvotes: 1

Related Questions