#10287 closed defect (fixed)
Error on commit
Reported by: | Ryan J Ollos | Owned by: | Michael Renzmann |
---|---|---|---|
Priority: | normal | Component: | TracHacks |
Severity: | normal | Keywords: | |
Cc: | Steffen Hoffmann, osimons | Trac Release: | 0.10 |
Description (last modified by )
I've seen the following error on commit:
post-commit hook failed (exit code 1) with output: /srv/trac-hacks.org/svn/trachacks/hooks/post-commit: line 47: /var/trac/trachacks010/log/trac-hacks-post-commit.log: No such file or directory
Attachments (0)
Change History (12)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Status: | new → assigned |
---|---|
Trac Release: | 0.12 → 0.10 |
Should be fixed now. Please test and report back.
comment:3 Changed 12 years ago by
hasienda mentioned on IRC last evening that the post-commit hook is still not working, and I'm seeing the same thing. I had to manually insert ticket/8690.
comment:4 Changed 12 years ago by
Here is a hint. I still received the following email, even though there was not a comment inserted in the ticket:
#10292: Line number IDs are not necessarily unique --------------------+--------------------------------------------------- --------------------+---- Reporter: rjollos | Owner: rjollos Type: defect | Status: new Priority: normal | Component: LinenoMacro Severity: normal | Keywords: Release: 0.12 | --------------------+--------------------------------------------------- --------------------+---- In [11941], the `IHTMLPreviewAnnotator` that is utilized was changed to `trac.mimeview.api.LineNumberAnnotator`, which includes an anchor for each line number. If there is more than one line-numbered code block in a resource, then the line numbers will not be unique. This was brought to my attention in the ticket for adding the feature to the Trac core, t:#10834. -- Ticket URL: <https://trac-hacks.org/ticket/10292> Trac Hacks - Plugins Macros etc. <http://trac-hacks.org> Trac Hacks - Hosting for Trac Plugins, Macros, etc.
comment:5 Changed 12 years ago by
I ran a touch /srv/trac-hacks.org/trac/log/trac-hacks-post-commit.log
, and after a commit the file is populated with:
Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] 'import site' failed; use -v for traceback Traceback (most recent call last): File "/usr/local/bin/trac-post-commit-hook-010", line 71, in <module> import re ImportError: No module named re
comment:6 Changed 12 years ago by
comment:7 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Changed the first line of /usr/local/bin/trac-post-commit-hook-010
:
#!/usr/local/pythonenv/TRAC-0.10/bin/python
->
#!/srv/trac-hacks.org/pve/bin/python
comment:9 Changed 12 years ago by
The only thing being added to the log on commit now is the benign:
/srv/trac-hacks.org/pve/lib/python2.6/site-packages/trac/util/__init__.py:21: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/usr/lib/python2.6/dist-packages/spambayes/classifier.py:43: DeprecationWarning: the sets module is deprecated
from sets import Set
comment:10 Changed 12 years ago by
The DeprecationWarning
should be gone now. No point having this message in the logs as long as we really only run released packages anyway.
I've added this:
import warnings warnings.filterwarnings("ignore", category=DeprecationWarning)
to /etc/python2.6/sitecustomize.py
comment:11 Changed 12 years ago by
Actually better to only hide the warnings for our Trac related code. I've moved the statements to a new /srv/trac-hacks.org/pve/lib/python2.6/sitecustomize.py
file instead.
It looks like there are a couple of changes needed in
/srv/trac-hacks.org/svn/trachacks/hooks/post-commit
, and maybepre-revprop-change
as well.I'm too tired to deal with this now, but will make the changes and test in the morning if someone doesn't beat me to it.