Opened 10 years ago

Last modified 9 years ago

#15 deploy defect

0.12でgraphviz pluginが動かない

Reported by: mitty Owned by: mitty
Priority: critical Component: configuration
Keywords: Trac Cc:

Description (last modified by mitty)

  • 当Tracでgraphviz pluginが動作しない
     {{{
     #!graphviz
     }}}
    
  • 上記だけでエラーとなる
    Traceback (most recent call last):
      File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.ja1-py2.6.egg/trac/web/api.py", line 436, in send_error
        data, 'text/html')
      File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.ja1-py2.6.egg/trac/web/chrome.py", line 844, in render_template
        stream.render(method, doctype=doctype, out=buffer)
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
        return encode(generator, method=method, encoding=encoding, out=out)
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 58, in encode
        for chunk in iterator:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 339, in __call__
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 826, in __call__
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 670, in __call__
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 771, in __call__
        for kind, data, pos in chain(stream, [(None, None, None)]):
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 586, in __call__
        for ev in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.ja1-py2.6.egg/trac/web/chrome.py", line 945, in _strip_accesskeys
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.ja1-py2.6.egg/trac/web/chrome.py", line 934, in _generate
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in _include
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in _match
        ctxt, start=idx + 1, **vars):
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 378, in _match
        ctxt, start=idx + 1, **vars):
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 327, in _match
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in _flatten
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
        subevent = next()
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in _include
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in _strip
        event = next()
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 545, in _flatten
        for kind, data, pos in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/path.py", line 588, in _generate
        subevent = next()
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in _include
        for event in stream:
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 316, in _strip
        event = next()
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 555, in _flatten
        for event in self._flatten(value, ctxt, **vars)
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 565, in _flatten
        result = _eval_expr(data, ctxt, vars)
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 277, in _eval_expr
        retval = expr.evaluate(ctxt)
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/eval.py", line 178, in evaluate
        return eval(self.code, _globals, {'__data__': data})
      File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.ja1-py2.6.egg/trac/templates/error.html", line 101, in <Expression u'project.admin_href.newticket()'>
        <form class="newticket" method="get" action="${project.admin_href.newticket()}#">
      File "/usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg/genshi/template/eval.py", line 277, in _die
        raise UndefinedError(self._name, self._owner)
    UndefinedError: None has no member named "newticket"
    

Attachments (1)

graphviz-fatalerror.png (135.7 KB) - added by mitty 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by mitty

comment:1 Changed 9 years ago by mitty

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 9 years ago by mitty

comment:3 Changed 9 years ago by mitty

  • Status changed from assigned to deploy
  • vim 0.11/graphviz/graphviz.py
    Index: 0.11/graphviz/graphviz.py
    ===================================================================
    --- 0.11/graphviz/graphviz.py   (revision 9708)
    +++ 0.11/graphviz/graphviz.py   (working copy)
    @@ -20,7 +20,7 @@
     import locale
     import os
     import re
    -import sha
    +import hashlib
     import subprocess
     import sys
    
    @@ -310,7 +310,7 @@
             encoded_cmd = (processor + unicode(self.processor_options)) \
                     .encode(self.encoding)
             encoded_content = content.encode(self.encoding)
    -        sha_key  = sha.new(encoded_cmd + encoded_content).hexdigest()
    +        sha_key  = hashlib.sha1(encoded_cmd + encoded_content).hexdigest()
             img_name = '%s.%s.%s' % (sha_key, processor, out_format)
             # cache: hash.<dot>.<png>
             img_path = os.path.join(self.cache_dir, img_name)
    
  • eggをrebuildすれば良い。
    • tracのverup時にrebuildが必要な模様(0.11->0.12)
Note: See TracTickets for help on using tickets.