Modify

Opened 13 years ago

Closed 10 years ago

#9646 closed defect (wontfix)

WindowsError: (5, 'Access is denied')

Reported by: dukenmarga@… Owned by: Herbert Valerio Riedel
Priority: highest Component: GitPlugin
Severity: blocker Keywords: directory,
Cc: Trac Release: 0.12

Description

How to Reproduce

While doing a GET operation on /browser/app/application/core, Trac issued an internal error.

I installed git+trac on my windows recently. The installation was finished and I can integrate git and trac and can be viewed in browser. But I have problem when I browse the resource via browser. I am developing web application using codeigniter. When I browse the root directory, it can be viewed by browser. But, when I tried to browser the child directory, the browser give me an error: WindowsError: [Error 5] Access is denied. I don't know its error came from git, trac, or windows itself. Then I try to search on internet and also from trac forum at google and I can't find anything useful. I need any help from you or any information that be able to solve my problem. Thanks anyway.

Request parameters:

{'path': u'/app/application/core'}

User agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7

System Information

Trac 0.12.2
Genshi 0.6
GIT 1.7.8.msysgit.0
MySQL server: "5.1.37", client: "5.1.50", thread-safe: 1
MySQLdb 1.2.3
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
setuptools 0.6c11
jQuery 1.4.2

Enabled Plugins

tracgit 0.12.0.5dev

Python Traceback

Traceback (most recent call last):
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\web\main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\versioncontrol\web_ui\browser.py", line 390, in process_request
    dir_data = self._render_dir(req, repos, node, rev, order, desc)
  File "c:\users\duken\appdata\local\temp\easy_install-vinrpq\Trac-0.12.2-py2.6-win32.egg.tmp\trac\versioncontrol\web_ui\browser.py", line 549, in _render_dir
    entries = [entry(n) for n in node.get_entries()
  File "build\bdist.win32\egg\tracext\git\git_fs.py", line 544, in get_entries
    yield GitNode(self.repos, ent[-1], self.rev, self.log, ent, historian)
  File "C:\Python26\lib\contextlib.py", line 23, in __exit__
    self.gen.next()
  File "build\bdist.win32\egg\tracext\git\PyGIT.py", line 760, in get_historian
    p[0].terminate()
  File "C:\Python26\lib\subprocess.py", line 937, in terminate
    TerminateProcess(self._handle, 1)
WindowsError: [Error 5] Access is denied

Attachments (0)

Change History (11)

comment:1 Changed 13 years ago by anonymous

I have the same issue

Any one fixing it?

comment:2 Changed 13 years ago by torresrogerio@…

me too,

Any one fixing it?

comment:3 Changed 13 years ago by Alex Willmer

Component: BrowserSvnOperationsPluginRoadmapFilterPlugin
Owner: changed from Alex Willmer to Dave

Hi, sorry for the delay. Are you sure you sure this bug is filed against the right plugin. BrowserSvnOperationsPlugin the deals with Subversion. Your description and traceback suggest you're having a problem with GitPlugin

comment:4 Changed 13 years ago by Alex Willmer

Component: RoadmapFilterPluginBrowserSvnOperationsPlugin
Owner: changed from Dave to Alex Willmer

comment:5 Changed 13 years ago by torresrogerio@…

Component: BrowserSvnOperationsPluginGitPlugin
Owner: changed from Alex Willmer to Herbert Valerio Riedel

I have the same problem. Any update about it?

comment:6 Changed 13 years ago by Ryan J Ollos

#9658 closed as a duplicate.

comment:7 Changed 13 years ago by Greg

I was also having the same issue. It seems that calling p[0].terminate() (on lines 744 and 760 of PyGIT.py) will fail with the access is denied message on Windows (I'm using Windows XP and Python 2.7.2) if the process has already completed (i.e. is no longer running).

An easy, but possibly error-prone, fix which solved the problem for me would be to poll the sub-process to see if it's alive before trying to terminating it:

if p[0].poll() is None:
    p[0].terminate()

A possibly more robust solution would be to catch the exception and ignore it:

try:
    p[0].terminate()
except WindowsError:
    pass

comment:8 in reply to:  7 Changed 13 years ago by anonymous

Thanks Greg! this fixed the issue.

#!python try:

p[0].terminate()

except WindowsError:

pass

comment:9 Changed 12 years ago by anonymous

Greg's fix also worked for me. For anyone who is unable to find PyGIT.py, it is most likely part of the tracgit egg file. Egg files are just renamed zip files, so you can just change it to a zip, open it, edit the file and rezip it/re-egg it.

I would recommend making a backup of the original before mucking around with it.

comment:10 Changed 12 years ago by torresrogerio@…

Priority: normalhighest
Severity: normalblocker

I did the change, but now I'm receiving this error:

ZipImportError: bad local file header in C:\\Python26\\lib\\site-packages\\tracgit-0.12.0.5dev-py2.6.egg

Anyone here can help me?

Last edited 12 years ago by Jun Omae (previous) (diff)

comment:11 Changed 10 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

GitPlugin is deprecated. Please upgrade to Trac 1.0 and use TracGit.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.