Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7063 closed defect (fixed)

ImportError: No module named neo_cs

Reported by: hzzhu Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: rendering Version: 0.11b2
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /admin/accounts/config, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'cat_id': u'accounts', 'panel_id': u'config', 'path_info': None}

User Agent was: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; zh-cn) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13

System Information

Trac 0.11b2
Python 2.5.2 (r252:60911, Mar 31 2008, 12:55:29)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]
setuptools 0.6c8
SQLite 3.3.17
pysqlite 2.4.1
mod_python 3.3.1
Genshi 0.4.4
Pygments 0.9
jQuery: 1.2.3

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/main.py", line 419, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/main.py", line 196, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/admin/web_ui.py", line 116, in process_request
    output = req.hdf.render(cstmpl)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11b2-py2.5.egg/trac/web/clearsilver.py", line 302, in render
    import neo_cs
ImportError: No module named neo_cs

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 16 years ago

Component: generalrendering
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

That ImportError should be converted to a clearer TracError, something like:

  • trac/web/clearsilver.py

     
    299299        """
    300300        if isinstance(template, basestring):
    301301            filename = template
    302             import neo_cs
     302            try:
     303                import neo_cs
     304            except ImportError:
     305                raise TracError("You're using a plugin which requires "
     306                                "the Clearsilver template engine and "
     307                                "Clearsilver is not installed. "
     308                                "Either disable that plugin or install "
     309                                "Clearsilver.")
    303310            template = neo_cs.CS(self.hdf)
    304311            template.parseFile(filename)
    305312

comment:2 by osimons, 16 years ago

Good idea. +1.

comment:3 by Jeroen Ruigrok van der Werven, 16 years ago

Fine by me.

comment:4 by Christian Boos, 16 years ago

Resolution: fixed
Severity: normalminor
Status: newclosed

Applied in r6822.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.