Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#11420 closed defect

HelloWorld sample plugin fails to load after failing to import cleandoc_ — at Version 1

Reported by: mjs@… Owned by:
Priority: normal Milestone: 1.0.2
Component: general Version: 1.0.1
Severity: normal Keywords: HelloWorld plugin cleandoc_
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

Error logs are filled with the following:

    2013-12-29 22:20:30,315 Trac[loader] ERROR: Failed to load plugin from /etc/tra\
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/trac/loader.py", line 90, in _load_py_\
        module = imp.load_source(plugin_name, plugin_file)
      File "/etc/trac/plugins.d/HelloWorld.py", line 39, in <module>
        class !HelloWorldMacro(!WikiMacroBase):
      File "/etc/trac/plugins.d/HelloWorld.py", line 40, in !HelloWorldMacro
        _description = cleandoc_(
    !NameError: name 'cleandoc_' is not defined

The problem seems to be solved by including

    from trac.util.translation import cleandoc_

in HelloWorld.py.

Change History (1)

comment:1 by Ryan J Ollos, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.