Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

Last modified 17 years ago

#4248 closed defect (worksforme)

"ImportError: cannot import name utc" in trac-post-commit-hook

Reported by: rouven <rouven@…> 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 Christian Boos, 18 years ago

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.

comment:2 by anonymous, 18 years ago

Resolution: fixed
Status: newclosed

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 Emmanuel Blot, 18 years ago

Resolution: fixed
Status: closedreopened

comment:4 by Emmanuel Blot, 18 years ago

Resolution: worksforme
Status: reopenedclosed

comment:5 by anonymous, 17 years ago

Resolution: worksforme
Status: closedreopened

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

in reply to:  5 comment:6 by Christian Boos, 17 years ago

Resolution: worksforme
Status: reopenedclosed

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 toby@…, 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 Christian Boos, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.