Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2511 closed defect (fixed)

Show error of "htdocs_location"

Reported by: silver.lao@… Owned by: Alec Thomas
Priority: highest Component: AddCommentMacro
Severity: blocker Keywords: htdocs_location
Cc: Trac Release: 0.11

Description

after I installed the plugin I got this error:

Error: Macro AddComment(None) failed htdocs_location

what is it mean ?!

And after I set the htdocs_location value in ini file, but the problem still there, and strange is the layout of webadmin is changed after I setup the htdocs_location to Alias /trac-htdocs /usr/share/trac/htdocs

Attachments (0)

Change History (7)

comment:1 Changed 9 years ago by Odd Simon Simonsen

Could you provide a traceback as well to provide more information? Turn on logging, and copy the relevant error from there. Need to look at the events leading up to this fatal behaviour.

comment:2 in reply to:  1 ; Changed 9 years ago by silver

but....... how can I turn on the log, could you tell me ?! I kown nothing about python, but you can have a look at http://www.cnflex.org/trac

Replying to osimons:

Could you provide a traceback as well to provide more information? Turn on logging, and copy the relevant error from there. Need to look at the events leading up to this fatal behaviour.

comment:3 in reply to:  2 ; Changed 9 years ago by Odd Simon Simonsen

Replying to silver:

but....... how can I turn on the log, could you tell me ?! I kown nothing about python, but you can have a look at http://www.cnflex.org/trac

trac:wiki:TracLogging - edit your project trac.ini file, make a request to the page with error, and see log/trac.log file (and then turn off logging again).

[logging]
log_type = file
log_level = DEBUG

Somewhere in those log lines it should show a traceback of some sort, or some other error message related to the macro and its execution.

comment:4 in reply to:  3 Changed 9 years ago by silver@…

Thanks , I got the log as below, seem that have two error

2008-02-13 00:42:32,706 Trac[main] DEBUG: Dispatching <Request "GET u'/wiki/WikiStart'">
2008-02-13 00:42:32,716 Trac[chrome] DEBUG: Prepare chrome data for request
2008-02-13 00:42:32,723 Trac[api] DEBUG: Updating wiki page index
2008-02-13 00:42:32,793 Trac[session] DEBUG: Retrieving session for ID u'silver'
2008-02-13 00:42:32,837 Trac[formatter] DEBUG: Executing Wiki macro AddComment by provider <addcomment.macro.AddCommentMacro object at 0xb53c580c>
2008-02-13 00:42:32,838 Trac[macros] WARNING: Executing pre-0.11 Wiki macro AddComment by provider <class 'addcomment.macro.AddCommentMacro'>
2008-02-13 00:42:32,844 Trac[perm] WARNING: perm.permissions() is deprecated and is only present for HDF compatibility
2008-02-13 00:42:32,851 Trac[formatter] ERROR: Macro AddComment(None) failed
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 465, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 179, in process
    text = self.processor(text)
  File "/usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/formatter.py", line 166, in _macro_processor
    text)
  File "/usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/wiki/macros.py", line 65, in expand_macro
    return self.render_macro(formatter.req, name, content)
  File "/usr/lib/python2.4/site-packages/TracAddCommentMacro-0.2-py2.4.egg/addcomment/macro.py", line 20, in render_macro
  File "/usr/lib/python2.4/site-packages/TracAddCommentMacro-0.2-py2.4.egg/addcomment/macro.py", line 110, in execute
  File "/usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg/trac/web/clearsilver.py", line 169, in __getitem__
    raise KeyError, name
KeyError: 'htdocs_location'
2008-02-13 00:42:32,999 Trac[loader] ERROR: Skipping "TracMacroPost 0.2": (version conflict "(TracMacroPost 0.1 (/usr/lib/python2.4/site-packages/TracMacroPost-0.1-py2.4.egg), Requirement.parse('TracMacroPost==0.2'))")
2008-02-13 00:42:33,000 Trac[loader] ERROR: Skipping "TracAddCommentMacro 0.3": (version conflict "(TracAddCommentMacro 0.2 (/usr/lib/python2.4/site-packages/TracAddCommentMacro-0.2-py2.4.egg), Requirement.parse('TracAddCommentMacro==0.3'))")
2008-02-13 00:42:33,000 Trac[loader] DEBUG: Loading trac.ticket.web_ui from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,000 Trac[loader] DEBUG: Loading trac.mimeview.php from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,000 Trac[loader] DEBUG: Loading trac.ticket.query from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,001 Trac[loader] DEBUG: Loading trac.attachment from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,001 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_fs from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,001 Trac[loader] DEBUG: Loading trac.mimeview.patch from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,002 Trac[loader] DEBUG: Loading trac.mimeview.txtl from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,008 Trac[loader] WARNING: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("textile>=2.0" not found)
2008-02-13 00:42:33,008 Trac[loader] DEBUG: Loading trac.admin.web_ui from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,009 Trac[loader] DEBUG: Loading trac.ticket.admin from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,009 Trac[loader] DEBUG: Loading trac.mimeview.rst from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,015 Trac[loader] WARNING: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("docutils>=0.3" not found)
2008-02-13 00:42:33,015 Trac[loader] DEBUG: Loading trac.db.postgres from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,016 Trac[loader] DEBUG: Loading trac.versioncontrol.web_ui from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,016 Trac[loader] DEBUG: Loading trac.timeline from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,016 Trac[loader] DEBUG: Loading trac.mimeview.pygments from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,017 Trac[loader] DEBUG: Loading trac.about from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,017 Trac[loader] DEBUG: Loading trac.ticket.roadmap from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,017 Trac[loader] DEBUG: Loading trac.mimeview.silvercity from /usr/lib/python2.4/site-packages/Trac-0.11b1-py2.4.egg
2008-02-13 00:42:33,023 Trac[loader] WARNING: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("SilverCity>=0.9.4" not found)
2008-02-13 00:42:33,024 Trac[loader] DEBUG: Loading trac.wiki.macros from

comment:5 Changed 9 years ago by Odd Simon Simonsen

This seems to indicate you are not running the latest version of the macro:

Executing pre-0.11 Wiki macro AddComment by
        provider <class 'addcomment.macro.AddCommentMacro'>

Just to be sure you are running the latest and greatest with your Trac 0.11 installation, follow the instructions at wiki:AddCommentMacro#Trac0.11.x

Could you please report back - and close the ticket as 'worksforme' if upgrading solves it for you?

comment:6 Changed 9 years ago by anonymous

Resolution: fixed
Status: newclosed

comment:7 Changed 9 years ago by silver.lao@…

it work, thank you very much!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.