I've upgraded to Trac 0.12 and am experimenting with the trac-
mercurial plugin. On one box (ubuntu 10.04) everything went fine. On
another (ubuntu 9.04), as soon as I try to add an hg repository I get
a yellow box with "Warning: Error with navigation contributor
"BrowserModule" and a pink box with "IOError: sys.stdin access
restricted by mod_wsgi".
(Note that I can view the hg repo just fine with hgwebdir.wsgi.)
==== System Information ====
|| '''`Trac`''' || `0.12` ||
|| '''`Docutils`''' || `0.5` ||
|| '''`Genshi`''' || `0.6` ||
|| '''`Mercurial`''' || `1.1.2` ||
|| '''`mod_python`''' || `3.3.1` ||
|| '''`Pygments`''' || `0.10` ||
|| '''`pysqlite`''' || `2.4.1` ||
|| '''`Python`''' || `2.6.2 (release26-maint, Apr 19 2009, 02:15:38) `
[[br]] `[GCC 4.3.3]` ||
|| '''`setuptools`''' || `0.6c9` ||
|| '''`SQLite`''' || `3.6.10` ||
|| '''`Subversion`''' || `1.5.4 (r33841)` ||
|| '''`jQuery`''' || `1.4.2` ||
==== Enabled Plugins ====
|| '''`TracMercurial`''' || `0.12.0.23dev-r9953` ||
Python Traceback
Most recent call last:
File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 513, in
_dispatch_request
dispatcher.dispatch(req)
File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 200, in
dispatch
chosen_handler)
File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 346, in
_pre_process_request
chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py", line
330, in pre_process_request
repo = self.get_repository(reponame)
File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py", line
526, in get_repository
repos = connector.get_repository(rtype, rdir, repoinfo.copy())
File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line 279,
in get_repository
self._setup_ui(options.get('hgrc'))
File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line 228,
in _setup_ui
self.ui = trac_ui(log=self.log)
File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line 329,
in __init__
ui.__init__(self, *args)
File "/var/lib/python-support/python2.6/mercurial/ui.py", line 50, in
__init__
self.readconfig(util.rcpath())
File "/var/lib/python-support/python2.6/mercurial/ui.py", line 166, in
readconfig
self.fixconfig(root=root)
File "/var/lib/python-support/python2.6/mercurial/ui.py", line 222, in
fixconfig
self.interactive = self.isatty()
File "/var/lib/python-support/python2.6/mercurial/ui.py", line 74, in
isatty
ui._isatty = sys.stdin.isatty()
* File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 513,
in _dispatch_request
Code fragment:
Line
508 try:
509 if not env and env_error:
510 raise HTTPInternalError(env_error)
511 try:
512 dispatcher = RequestDispatcher(env)
513 dispatcher.dispatch(req)
514 except RequestDone:
515 pass
516 resp = req._response or []
517
518 except HTTPException, e:
Local variables:
Name Value
dispatcher <trac.web.main.RequestDispatcher object at
0x7fcecf486c10>
e IOError('sys.stdin access restricted by mod_wsgi',)
env <trac.env.Environment object at 0x7fcece8918d0>
env_error None
req <Request "GET '/'">
resp []
* File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 200,
in dispatch
Code fragment:
Line
195 if not req.path_info or req.path_info == '/':
196 chosen_handler = self.default_handler
197 # pre-process any incoming request, whether a handler
198 # was found or not
199 chosen_handler = self._pre_process_request(req,
200 chosen_handler)
201 except TracError, e:
202 raise HTTPInternalError(e)
203 if not chosen_handler:
204 if req.path_info.endswith('/'):
205 # Strip trailing / and redirect
Local variables:
Name Value
chosen_handler <trac.wiki.web_ui.WikiModule object at
0x7fcecf4860d0>
chrome <trac.web.chrome.Chrome object at 0x7fcecf47e3d0>
err (<type 'exceptions.IOError'>, IOError('sys.stdin access
restricted by ...
handler <trac.wiki.web_ui.WikiModule object at 0x7fcecf4860d0>
req <Request "GET '/'">
self <trac.web.main.RequestDispatcher object at 0x7fcecf486c10>
* File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 346,
in _pre_process_request
Code fragment:
Line
341 req.outcookie['trac_form_token']['secure'] = True
342 return req.outcookie['trac_form_token'].value
343
344 def _pre_process_request(self, req, chosen_handler):
345 for filter_ in self.filters:
346 chosen_handler = filter_.pre_process_request(req,
chosen_handler)
347 return chosen_handler
348
349 def _post_process_request(self, req, *args):
350 nbargs = len(args)
351 resp = args
Local variables:
Name Value
chosen_handler <trac.wiki.web_ui.WikiModule object at
0x7fcecf4860d0>
filter_ <trac.versioncontrol.api.RepositoryManager object at
0x7fcecf4863d0>
req <Request "GET '/'">
self <trac.web.main.RequestDispatcher object at 0x7fcecf486c10>
* File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py",
line 330, in pre_process_request
Code fragment:
Line
325 for reponame in self.repository_sync_per_request:
326 start = time.time()
327 if is_default(reponame):
328 reponame = ''
329 try:
330 repo = self.get_repository(reponame)
331 if repo:
332 repo.sync()
333 except TracError, e:
334 add_warning(req,
335 _("Can't synchronize with repository \"%(name)s\" "
Local variables:
Name Value
Chrome <class 'trac.web.chrome.Chrome'>
add_warning <function add_warning at 0x7fcecef44d70>
handler <trac.wiki.web_ui.WikiModule object at 0x7fcecf4860d0>
reponame ''
req <Request "GET '/'">
self <trac.versioncontrol.api.RepositoryManager object at
0x7fcecf4863d0>
start 1287339867.7395799
* File "build/bdist.linux-x86_64/egg/trac/versioncontrol/api.py",
line 526, in get_repository
Code fragment:
Line
521 repos = repositories.get(reponame)
522 if not repos:
523 if not os.path.isabs(rdir):
524 rdir = os.path.join(self.env.path, rdir)
525 connector = self._get_connector(rtype)
526 repos = connector.get_repository(rtype, rdir,
repoinfo.copy())
527 repositories[reponame] = repos
528 return repos
529 finally:
530 self._lock.release()
531
Local variables:
Name Value
connector <tracext.hg.backend.MercurialConnector object at
0x7fcecf492110>
db <trac.db.pool.PooledConnection object at 0x7fcecf489af0>
rdir u'/D/progetti/hg/IGM2'
repoinfo {'name': '', 'dir': u'/D/progetti/hg/IGM2', 'id': 4}
reponame ''
repos None
repositories {}
rtype u'hg'
self <trac.versioncontrol.api.RepositoryManager object at
0x7fcecf4863d0>
tid 140526175209312
* File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line
279, in get_repository
Code fragment:
Line
274 options = {}
275 for key, val in self.config.options(type):
276 options[key] = val
277 options.update(params)
278 if not self.ui:
279 self._setup_ui(options.get('hgrc'))
280 repos = MercurialRepository(dir, options, self.log, self.ui)
281 repos.version_info = self._version_info
282 return repos
283
284 # IWikiSyntaxProvider methods
Local variables:
Name Value
dir u'/D/progetti/hg/IGM2'
options {'name': '', 'dir': u'/D/progetti/hg/IGM2', 'id': 4}
params {'name': '', 'dir': u'/D/progetti/hg/IGM2', 'id': 4}
self <tracext.hg.backend.MercurialConnector object at
0x7fcecf492110>
type u'hg'
* File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line
228, in _setup_ui
Code fragment:
Line
223 m = re.match(r'(\d+)\.(\d+)(?:\.(\d+))?', self._version or
'')
224 if m:
225 self._version_info = tuple([int(n or 0) for n in
m.groups()])
226
227 def _setup_ui(self, hgrc_path):
228 self.ui = trac_ui(log=self.log)
229 # (code below adapted from mercurial.dispatch._dispatch)
230
231 # read the local repository .hgrc into a local ui object
232 if hgrc_path:
233 if not os.path.isabs(hgrc_path):
Local variables:
Name Value
hgrc_path None
self <tracext.hg.backend.MercurialConnector object at
0x7fcecf492110>
* File "build/bdist.linux-x86_64/egg/tracext/hg/backend.py", line
329, in __init__
Code fragment:
Line
324
325 ### Helpers
326
327 class trac_ui(ui):
328 def __init__(self, *args, **kwargs):
329 ui.__init__(self, *args)
330 self.setconfig('ui', 'interactive', 'off')
331 self.log = kwargs.get('log', args and args[0].log or None)
332
333 def write(self, *args, **opts):
334 for a in args:
Local variables:
Name Value
args ()
kwargs {'log': <logging.Logger instance at 0x7fcecef9a3f8>}
self <tracext.hg.backend.trac_ui object at 0x7fcecf492550>
* File "/var/lib/python-support/python2.6/mercurial/ui.py", line
50, in __init__
Code fragment:
Line
45 # if ucdata is not None, its keys must be a superset of
cdata's
46 self.cdata = util.configparser()
47 self.ucdata = None
48 # we always trust global config files
49 self.check_trusted = False
50 self.readconfig(util.rcpath())
51 self.check_trusted = True
52 self.updateopts(verbose, debug, quiet, interactive)
53 else:
54 # parentui may point to an ui object which is already a child
55 self.parentui = parentui.parentui or parentui
Local variables:
Name Value
debug False
interactive True
parentui None
quiet False
report_untrusted True
self <tracext.hg.backend.trac_ui object at 0x7fcecf492550>
traceback False
verbose False
* File "/var/lib/python-support/python2.6/mercurial/ui.py", line
166, in readconfig
Code fragment:
Line
161 # override data from config files with data set with
ui.setconfig
162 if self.overlay:
163 updateconfig(self.overlay, self.cdata)
164 if root is None:
165 root = os.path.expanduser('~')
166 self.fixconfig(root=root)
167
168 def readsections(self, filename, *sections):
169 """Read filename and add only the specified sections to the
config data
170
171 The settings are added to the trusted config data.
Local variables:
Name Value
cdata <mercurial.util.configparser instance at 0x7fcecf5ec710>
f '/var/www/.hgrc'
fn ['/etc/mercurial/hgrc', '/etc/mercurial/hgrc.d/
mergetools.rc', ...
fp <open file '/etc/mercurial/hgrc.d/hgext.rc', mode 'r' at
0x7fceceea5140>
root '/var/www'
self <tracext.hg.backend.trac_ui object at 0x7fcecf492550>
trusted True
* File "/var/lib/python-support/python2.6/mercurial/ui.py", line
222, in fixconfig
Code fragment:
Line
217 if name is None or name in ('quiet', 'verbose', 'debug'):
218 self.verbosity_constraints()
219 if name is None or name == 'interactive':
220 interactive = self.configbool("ui", "interactive", None)
221 if interactive is None and self.interactive:
222 self.interactive = self.isatty()
223 else:
224 self.interactive = interactive
225 if name is None or name == 'report_untrusted':
226 self.report_untrusted = (
227 self.configbool("ui", "report_untrusted", True))
Local variables:
Name Value
cdata None
interactive None
items []
name None
pathsitems []
root '/var/www'
section None
self <tracext.hg.backend.trac_ui object at 0x7fcecf492550>
value None
* File "/var/lib/python-support/python2.6/mercurial/ui.py", line
74, in isatty
Code fragment:
Line
69 def __getattr__(self, key):
70 return getattr(self.parentui, key)
71
72 def isatty(self):
73 if ui._isatty is None:
74 ui._isatty = sys.stdin.isatty()
75 return ui._isatty
76
77 def updateopts(self, verbose=False, debug=False, quiet=False,
78 interactive=True, traceback=False, config=[]):
79 for section, name, value in config:
Local variables:
Name Value
self <tracext.hg.backend.trac_ui object at 0x7fcecf492550>
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.