Modify

Opened 11 years ago

Closed 8 years ago

#10452 closed defect (fixed)

OSError: [Errno 2] No such file or directory

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Noah Kantrowitz Trac Release: 0.12

Description

How to Reproduce

While doing a GET operation on /depgraph/milestone/milestone1, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{}

User agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4

System Information

Trac 0.12
Genshi 0.6
Pygments 1.3.1
pysqlite 2.6.0
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5]
setuptools 0.6
SQLite 3.7.3
Subversion 1.7.5 (r1336830)
jQuery 1.4.2

Enabled Plugins

TracMasterTickets 3.0.2

Python Traceback

Traceback (most recent call last):
  File "/home/user/Workspace/th7945/trac-0.12/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "/home/user/Workspace/th7945/trac-0.12/trac/web/main.py", line 256, in dispatch
    content_type)
  File "/home/user/Workspace/th7945/trac-0.12/trac/web/chrome.py", line 844, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/trac-0.12/trac/web/chrome.py", line 945, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/trac-0.12/trac/web/chrome.py", line 934, in _generate
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 545, in _flatten
    for kind, data, pos in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/markup.py", line 316, in _strip
    event = next()
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 565, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/home/user/Workspace/th7945/genshi-0.6.0/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/home/user/Workspace/trac-mastertickets/mastertickets/templates/depgraph.html", line 32, in <Expression u"Markup(graph_render('cmapx').decode('utf8'))">
    ${Markup(graph_render('cmapx').decode('utf8'))}
  File "/home/user/Workspace/trac-mastertickets/mastertickets/graphviz.py", line 132, in render
    proc = subprocess.Popen([dot_path, '-T%s'%format], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Attachments (0)

Change History (6)

comment:1 Changed 11 years ago by Ryan J Ollos

When graphviz is not installed or dot_path is not configured, this error can result. We should raise a friendly TracError or add_warning under this condition.

comment:2 Changed 11 years ago by Ryan J Ollos

SO:377017 might help here.

comment:3 Changed 10 years ago by Ryan J Ollos

Status: newassigned

comment:4 Changed 8 years ago by Ryan J Ollos

Traceback when running latest version of source:

2015-12-09 13:14:42,332 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/depgraph/milestone/none'">, referrer None
Traceback (most recent call last):
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 554, in _dispatch_request
    dispatcher.dispatch(req)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 267, in dispatch
    iterable=chrome.use_chunked_encoding)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1111, in render_template
    encoding='utf-8')
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 184, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 350, in __call__
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 829, in __call__
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 669, in __call__
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 774, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/output.py", line 594, in __call__
    for ev in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1309, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1298, in _generate
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/filters/transform.py", line 706, in _unmark
    for mark, event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/filters/transform.py", line 1101, in __call__
    for mark, event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/filters/transform.py", line 118, in __iter__
    event = self.stream.next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/filters/transform.py", line 734, in __call__
    for mark, event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/filters/transform.py", line 702, in _mark
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 362, in _match
    content = list(content)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 326, in _match
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 558, in _flatten
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 558, in _flatten
    for kind, data, pos in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 578, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/base.py", line 289, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/genshi/template/eval.py", line 177, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/mastertickets/templates/depgraph.html", line 32, in <Expression u"Markup(graph_render('cmapx').decode('utf8'))">
    ${Markup(graph_render('cmapx').decode('utf8'))}
  File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/mastertickets/graphviz.py", line 141, in render
    stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

comment:5 Changed 8 years ago by Ryan J Ollos

Status: assignedaccepted

comment:6 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 15178:

4.0.0dev: Raise TracError if dot binary path is invalid

Code snippet from SO:377028 is utilized.

Fixes #10452.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.