#11820 closed defect (duplicate)
pygments 2.0 & 2.0.1 does not work
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 1.0.4 |
Severity: | major | Keywords: | pygments |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I just updated my pygments from 1.6 to 2.0.1 on my trac 1.0.2 and noticed that syntax highlighting does not work anymore.
Aktivating the log file I can see that the plugin load crashes.
I use:
- win7 64 bit
- python 2.7.8 32 bit
2014-11-12 08:43:36,711 Trac[loader] ERROR: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": Traceback (most recent call last): File "D:\Programme\python27\lib\site-packages\trac\loader.py", line 68, in _load_eggs entry.load(require=True) File "build\bdist.win32\egg\pkg_resources.py", line 2184, in load ['__name__']) File "D:\Programme\python27\lib\site-packages\trac\mimeview\pygments.py", line 37, in <module> HtmlFormatter = pygments.formatters.html.HtmlFormatter File "D:\Programme\python27\lib\site-packages\pygments\formatters\__init__.py", line 111, in __getattr__ raise AttributeError(name) AttributeError: html
Attachments (0)
Change History (9)
comment:1 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
follow-ups: 3 4 5 comment:2 by , 10 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Version: | 1.0.2 → 1.0.4 |
Reopening against 1.0.4. I know this was closed as duplicate of #11796, but it does not look to be the same issue.
In Trac 1.0.4 using Pygments 2.0.2 I get the following error log, which is consistent with this ticket's description. Pygments 1.6 works fine.
Environment Win7 x64, 32-bit Python
Package Version Trac 1.0.4 Docutils 0.12 Genshi 0.6 (without speedups) mod_python 3.3.1 Pygments 1.6 pysqlite 2.4.1 Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] setuptools 1.4.1 SQLite 3.5.9 Subversion 1.8.5 (r1542147) jQuery 1.7.2
Error log
2015-03-08 22:37:00,446 Trac[loader] ERROR: Skipping "codeexample = codeexample": Traceback (most recent call last): File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\trac\loader.py", line 68, in _load_eggs entry.load(require=True) File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\pkg_resources.py", line 2108, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "build\bdist.win32\egg\codeexample\__init__.py", line 1, in <module> File "build\bdist.win32\egg\codeexample\code_example_processor.py", line 41, in <module> File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\trac\mimeview\pygments.py", line 37, in <module> HtmlFormatter = pygments.formatters.html.HtmlFormatter File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\pygments-2.0.2-py2.6.egg\pygments\formatters\__init__.py", line 111, in __getattr__ raise AttributeError(name) AttributeError: html
comment:3 by , 10 years ago
follow-up: 6 comment:4 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\trac\mimeview\pygments.py", line 37, in <module> HtmlFormatter = pygments.formatters.html.HtmlFormatter
It seems that you still use Trac 1.0.2.
- See tags/trac-1.0.2/trac/mimeview/pygments.py@:37#L32
HtmlFormatter = pygments.formatters.html.HtmlFormatter
doesn't exist in tags/trac-1.0.4/trac/mimeview/pygments.py.
comment:5 by , 10 years ago
Replying to anonymous:
Reopening against 1.0.4.
Doing really well here. I got the wrong error log entry.
2015-03-08 22:37:00,476 Trac[loader] ERROR: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": Traceback (most recent call last): File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\trac\loader.py", line 68, in _load_eggs entry.load(require=True) File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\pkg_resources.py", line 2108, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\trac\mimeview\pygments.py", line 37, in <module> HtmlFormatter = pygments.formatters.html.HtmlFormatter File "C:\Program Files (x86)\VisualSVN Server\trac\python\lib\site-packages\pygments-2.0.2-py2.6.egg\pygments\formatters\__init__.py", line 111, in __getattr__ raise AttributeError(name) AttributeError: html
comment:6 by , 10 years ago
Replying to jomae:
It seems that you still use Trac 1.0.2.
I do not think that is true. Here is the start of my Trac startup log
2015-03-08 22:37:00,352 Trac[env] INFO: -------------------------------- environment startup [Trac 1.0.4] --------------------------------
follow-up: 9 comment:7 by , 10 years ago
I consider you have an InstallationIssue. Installed Trac code in your environment is 1.0.2. Trac's egg-info is only 1.0.4. Otherwise, you probably haven't restarted your web server.
- Stop your web server
- Remove
lib/site-packages/trac
,lib/site-packages/tracopt
andlib/site-packages/Trac-*.egg-info
- Reinstall Trac 1.0.4
- Start your web server
comment:8 by , 10 years ago
Keywords: | pygments added |
---|
comment:9 by , 10 years ago
Replying to jomae:
I consider you have an InstallationIssue.
You are correct. I had stopped the server during upgrade. But, I did not delete all old site-packages prior to install. I did not know it was possible for the log to say one version of Trac, but for the actual running system to be another version. I had assumed the egg was self-contained for core components.
Sorry to reopen a ticket for a site configuration error.
A duplicate of #11796.