Opened 10 years ago
Last modified 10 years ago
#11420 closed defect
HelloWorld sample plugin fails to load after failing to import cleandoc_ — at Initial Version
Reported by: | 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
Error logs are filled with the following:
2013-12-29 22:20:30,315 Trac[loader] ERROR: Failed to load plugin from /etc/tra\ c/plugins.d/HelloWorld.py: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/trac/loader.py", line 90, in _load_py_\
files
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.