traceback with mimeview

25 views
Skip to first unread message

Tim Tisdall

unread,
May 21, 2015, 5:27:15 PM5/21/15
to trac-...@googlegroups.com
When trying to get syntax highlighting working I got the following traceback:

2015-05-21 15:14:23,864 Trac[loader] ERROR: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": 
Traceback (most recent call last):
  File "/sites/apache-bloodhound-0.8/installer/bloodhound/lib/python2.7/site-packages/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/sites/apache-bloodhound-0.8/installer/bloodhound/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2312, in load
    return self.resolve()
  File "/sites/apache-bloodhound-0.8/installer/bloodhound/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2318, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/sites/apache-bloodhound-0.8/installer/bloodhound/lib/python2.7/site-packages/trac/mimeview/pygments.py", line 38, in <module>
    HtmlFormatter = pygments.formatters.html.HtmlFormatter
  File "/sites/apache-bloodhound-0.8/installer/bloodhound/lib/python2.7/site-packages/pygments/formatters/__init__.py", line 111, in __getattr__
    raise AttributeError(name)
AttributeError: html


I was able to fix it by changing:

HtmlFormatter = pygments.formatters.html.HtmlFormatter

to:

HtmlFormatter = pygments.formatters.HtmlFormatter

This is with Pygments==2.0.2, Trac==1.0.1


RjOllos

unread,
May 21, 2015, 11:45:38 PM5/21/15
to trac-...@googlegroups.com
The issue has been fixed with Trac 1.0.2 (1), but Bloodhound has not merged the source for Trac 1.0.2 into their project. You'll need to use Pygments 1.6 as a workaround. Please make sure to ask Bloodhound-related questions on the Bloodhound mailing list in the future (2).

Reply all
Reply to author
Forward
0 new messages