I recently installed Trac on windows for the first time. After setting everything up I got this error when trying to browse the source in a GIT repository:
Trac detected an internal error:
WindowsError: (5, 'Access is denied')
It doesn’t look like many people have come across this as the only ticketed bug for this hasn’t had many responses, but there was a guy who suggested that I modify the file PyGIT.py. Looking further into my own exception I find this:
return gen.next()
yield historian
if p:
p[0].stdout.close()
p[0].terminate() # <-- This line highlighted as the problem
p[0].wait()
def last_change(self, sha, path, historian=None):
if historian is not None:
return historian(path)
Now I am not sure but I read that this is something to do with how windows processes p[0].terminate() that causes the error and it was suggested that the exception was ignored by changing it to this:
try:
p[0].terminate()
except WindowsError:
pass
Weather or not this will work, I don’t know. But what I’m wondering is – where on earth is this PyGIT.py file? All I have to go by is the path:
build/bdist.win32/egg/tracext/git/PyGIT.py
Am I right in thinking this isn’t part of a compiled file or something? I installed the plugin that runs the code as a .egg
If anyone could give me a hand, all I want to do it see if I can modify the file!
Thanks
If you installed the plugin as a .egg file, then you probably don’t have the source code. The website where you downloaded the .egg file should also have a URL for their repository. Simply check out a copy of the source code, make the suggested modification, and rebuild the .egg with
python setup.py bdist-egg.