#4248 closed defect (worksforme)
"ImportError: cannot import name utc" in trac-post-commit-hook
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Hi, it seems something is broken with the utc module. i don't know much about python, but this seems to be a missing module. i installed some python date modules like "Olson timezone database" for example, but this does not seem to work.
i am using debian etch with 0.10.3dev
cheers Rouven
Attachments (0)
Change History (8)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
well i fixed it for myself, it seems that i forgot to checkout the latest datefmt.py. this was the only problem i think.
rouven
comment:3 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:4 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
follow-up: 6 comment:5 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Just ran into this and here is the back trace. v0.10 running via upgrade from 0.9. upgraded code, db and docs, though i doubt the last one matters ;)
Traceback (most recent call last):
File "/usr/local/src/trac/contrib/trac-post-commit-hook", line 85, in ?
from trac.util.datefmt import utc
ImportError: cannot import name utc
comment:6 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Replying to anonymous:
The contrib/trac-post-commit-hook must be of the same line of development as the Trac version you're using.
Here, you're using source:trunk/contrib/trac-post-commit-hook which is the milestone:0.11 compatible one, with a 0.10 installation.
Likewise, you're likely get similar issues when trying to run the source:branches/0.10-stable/contrib/trac-post-commit-hook with a 0.11 Trac.
comment:7 by , 17 years ago
I tried the hook current when 0.10.4 was tagged (r5236) and it has the same problem.
utc is referenced all the way back to r4159: http://trac.edgewall.org/changeset?new=4159%40trunk%2Fcontrib%2Ftrac-post-commit-hook&old=3743%40trunk%2Fcontrib%2Ftrac-post-commit-hook
comment:8 by , 17 years ago
Yes, that's normal. r5236 back to r4159 on trunk was already 0.11dev. You should have looked in the source:branches/0.10-stable or in source:tags for the matching release, but not in trunk.
Well, the 0.10 branch doesn't use the utc module (did you mean pytz here?), the 0.11 branch does, however (optionally).
So could this error be caused by trying to use a 0.11 plugin in 0.10.3?
In any case, you should give us more information about the error you got, like a backtrace.