Opened 9 years ago

Closed 9 years ago

#5913 closed bug (fixed)

OSError: (2, 'No such file or directory')

Reported by: idefix Owned by: haiku-web
Priority: normal Milestone:
Component: Website/Trac Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

How to Reproduce

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

  1. open ticket:5208
  2. click on the Depgraph link in the top-right corner

User Agent was: Opera/9.80 (X11; Linux i686; U; en-GB) Presto/2.5.24 Version/10.53

System Information

Trac 0.11.7
Python 2.6 (r26:66714, Feb 3 2009, 20:52:03)
[GCC 4.3.2 [gcc-4_3-branch revision 141291]]
setuptools 0.6c8
psycopg2 2.0.12
Genshi 0.5.1
mod_wsgi 2.5 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments 1.2.2
Subversion 1.6.3 (r38063)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 227, in dispatch
    data, content_type)
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 773, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 179, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 61, in encode
    for chunk in iterator:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 311, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 753, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 592, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 698, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/lib/python2.6/site-packages/genshi/output.py", line 532, in __call__
    for ev in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 838, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line 827, in _generate
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx   1, **vars):
  File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx   1, **vars):
  File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 245, in _match
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 520, in _eval
    result = _eval_expr(data, ctxt, **vars)
  File "/usr/lib/python2.6/site-packages/genshi/template/base.py", line 286, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/lib/python2.6/site-packages/genshi/template/eval.py", line 180, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/srv/trac/dev.haiku-os.org/eggs/TracMasterTickets-2.1.3_haiku-py2.6.egg-tmp/mastertickets/templates/depgraph.html", line 22, in <Expression u"Markup(graph_render('cmapx').decode('utf8'))">
    ${Markup(graph_render('cmapx').decode('utf8'))}
  File "build/bdist.linux-i686/egg/mastertickets/graphviz.py", line 129, in render
    proc = subprocess.Popen([dot_path, '-T%s'%format], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1106, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Change History (2)

comment:1 by idefix, 9 years ago

Another bug, related to this one:

If you click on the Create button in the Internal Error page that the Depgraph link opens, the following page opens:

Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server.
Apache/2.2.15 (Linux/SUSE) Server at dev.haiku-os.org Port 80

Which isn't all too surprising, as the URL is rather long:

http://dev.haiku-os.org/newticket?reporter=idefix&summary=OSError%3A+%282%2C+%27No+such+file+or+directory%27%29&description=%0D%0A%3D%3D%3D%3D+How+to+Reproduce+%3D%3D%3D%3D%0D%0A%0D%0AWhile+doing+a+GET+operation+on+%60%2Fdepgraph%2F5208%60%2C+Trac+issued+an+internal+error.%0D%0A%0D%0A%27%27%28please+provide+additional+details+here%29%27%27%0D%0A%0D%0A%0D%0A%0D%0AUser+Agent+was%3A+%60Opera%2F9.80+%28X11%3B+Linux+i686%3B+U%3B+en-GB%29+Presto%2F2.5.24+Version%2F10.53%60%0D%0A%0D%0A%3D%3D%3D%3D+System+Information+%3D%3D%3D%3D%0D%0A%0D%0A%7C%7C+%27%27%27Trac%27%27%27+%7C%7C+%600.11.7%60+%7C%7C%0D%0A%7C%7C+%27%27%27Python%27%27%27+%7C%7C+%602.6+%28r26%3A66714%2C+Feb++3+2009%2C+20%3A52%3A03%29+%60+%5B%5Bbr%5D%5D+%60%5BGCC+4.3.2+%5Bgcc-4_3-branch+revision+141291%5D%5D%60+%7C%7C%0D%0A%7C%7C+%27%27%27setuptools%27%27%27+%7C%7C+%600.6c8%60+%7C%7C%0D%0A%7C%7C+%27%27%27psycopg2%27%27%27+%7C%7C+%602.0.12%60+%7C%7C%0D%0A%7C%7C+%27%27%27Genshi%27%27%27+%7C%7C+%600.5.1%60+%7C%7C%0D%0A%7C%7C+%27%27%27mod_wsgi%27%27%27+%7C%7C+%602.5+%28WSGIProcessGroup++WSGIApplicationGroup+%25%7BGLOBAL%7D%29%60+%7C%7C%0D%0A%7C%7C+%27%27%27Pygments%27%27%27+%7C%7C+%601.2.2%60+%7C%7C%0D%0A%7C%7C+%27%27%27Subversion%27%27%27+%7C%7C+%601.6.3+%28r38063%29%60+%7C%7C%0D%0A%7C%7C+%27%27%27jQuery%3A%27%27%27+%7C%7C+%601.2.6%60+%7C%7C%0D%0A%0D%0A%3D%3D%3D%3D+Python+Traceback+%3D%3D%3D%3D%0D%0A%7B%7B%7B%0D%0ATraceback+%28most+recent+call+last%29%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Ftrac%2Fweb%2Fmain.py%22%2C+line+450%2C+in+_dispatch_request%0D%0A++++dispatcher.dispatch%28req%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Ftrac%2Fweb%2Fmain.py%22%2C+line+227%2C+in+dispatch%0D%0A++++data%2C+content_type%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Ftrac%2Fweb%2Fchrome.py%22%2C+line+773%2C+in+render_template%0D%0A++++stream.render%28method%2C+doctype%3Ddoctype%2C+out%3Dbuffer%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+179%2C+in+render%0D%0A++++return+encode%28generator%2C+method%3Dmethod%2C+encoding%3Dencoding%2C+out%3Dout%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+61%2C+in+encode%0D%0A++++for+chunk+in+iterator%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+311%2C+in+__call__%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+753%2C+in+__call__%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+592%2C+in+__call__%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+698%2C+in+__call__%0D%0A++++for+kind%2C+data%2C+pos+in+chain%28stream%2C+%5B%28None%2C+None%2C+None%29%5D%29%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Foutput.py%22%2C+line+532%2C+in+__call__%0D%0A++++for+ev+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Ftrac%2Fweb%2Fchrome.py%22%2C+line+838%2C+in+_strip_accesskeys%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Ftrac%2Fweb%2Fchrome.py%22%2C+line+827%2C+in+_generate%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+569%2C+in+_include%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fmarkup.py%22%2C+line+298%2C+in+_match%0D%0A++++ctxt%2C+start%3Didx+%2B+1%2C+%2A%2Avars%29%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fmarkup.py%22%2C+line+298%2C+in+_match%0D%0A++++ctxt%2C+start%3Didx+%2B+1%2C+%2A%2Avars%29%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fmarkup.py%22%2C+line+245%2C+in+_match%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+543%2C+in+_exec%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+533%2C+in+_eval%0D%0A++++for+event+in+substream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+496%2C+in+_eval%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+551%2C+in+_flatten%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fpath.py%22%2C+line+141%2C+in+_generate%0D%0A++++subevent+%3D+stream.next%28%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+569%2C+in+_include%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fmarkup.py%22%2C+line+234%2C+in+_strip%0D%0A++++event+%3D+stream.next%28%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+543%2C+in+_exec%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+533%2C+in+_eval%0D%0A++++for+event+in+substream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+496%2C+in+_eval%0D%0A++++for+kind%2C+data%2C+pos+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+551%2C+in+_flatten%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fcore.py%22%2C+line+283%2C+in+_ensure%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Fpath.py%22%2C+line+141%2C+in+_generate%0D%0A++++subevent+%3D+stream.next%28%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+569%2C+in+_include%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fmarkup.py%22%2C+line+234%2C+in+_strip%0D%0A++++event+%3D+stream.next%28%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+543%2C+in+_exec%0D%0A++++for+event+in+stream%3A%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+520%2C+in+_eval%0D%0A++++result+%3D+_eval_expr%28data%2C+ctxt%2C+%2A%2Avars%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Fbase.py%22%2C+line+286%2C+in+_eval_expr%0D%0A++++retval+%3D+expr.evaluate%28ctxt%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsite-packages%2Fgenshi%2Ftemplate%2Feval.py%22%2C+line+180%2C+in+evaluate%0D%0A++++return+eval%28self.code%2C+_globals%2C+%7B%27__data__%27%3A+data%7D%29%0D%0A++File+%22%2Fsrv%2Ftrac%2Fdev.haiku-os.org%2Feggs%2FTracMasterTickets-2.1.3_haiku-py2.6.egg-tmp%2Fmastertickets%2Ftemplates%2Fdepgraph.html%22%2C+line+22%2C+in+%3CExpression+u%22Markup%28graph_render%28%27cmapx%27%29.decode%28%27utf8%27%29%29%22%3E%0D%0A++++%24%7BMarkup%28graph_render%28%27cmapx%27%29.decode%28%27utf8%27%29%29%7D%0D%0A++File+%22build%2Fbdist.linux-i686%2Fegg%2Fmastertickets%2Fgraphviz.py%22%2C+line+129%2C+in+render%0D%0A++++proc+%3D+subprocess.Popen%28%5Bdot_path%2C+%27-T%25s%27%25format%5D%2C+stdin%3Dsubprocess.PIPE%2C+stdout%3Dsubprocess.PIPE%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsubprocess.py%22%2C+line+595%2C+in+__init__%0D%0A++++errread%2C+errwrite%29%0D%0A++File+%22%2Fusr%2Flib%2Fpython2.6%2Fsubprocess.py%22%2C+line+1106%2C+in+_execute_child%0D%0A++++raise+child_exception%0D%0AOSError%3A+%5BErrno+2%5D+No+such+file+or+directory%0D%0A%0D%0A%7D%7D%7D%0D%0A++++&create=Create#

It might be a good idea to change the submit method of the Create button from GET to POST.

comment:2 by nielx, 9 years ago

Resolution: fixed
Status: newclosed

The graph generation should now work.

The 'automatic' ticket generation is a Trac thing, I'll look at it when it is more problematic, but I reckon it is better to fix the issues :-)

Note: See TracTickets for help on using tickets.