Modify ↓
Opened 14 years ago
Closed 11 years ago
#8235 closed defect (fixed)
[error] AttributeError: 'module' object has no attribute 'now'
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | TracMetrixPlugin |
Severity: | normal | Keywords: | needinfo |
Cc: | Trac Release: | 0.12 |
Description
Hi guys,
I am using Trac 0.12 - TracMetrixPlugin 0.18 - matplotlib 1.0.0 - Python 2.6.5 Error trying to Show Project Metrics after pressing Update button:
On Py console tested:
>>> from datetime import datetime >>> datetime.now() datetime.datetime(2010, 11, 29, 15, 17, 12, 175421)
So, the fix was to move "from datetime import timedelta, datetime" to the line 33 (which is, at the end of the "imports").
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by
Status: | new → assigned |
---|---|
Trac Release: | 0.11 → 0.12 |
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
comment:4 Changed 14 years ago by
Keywords: | needinfo added |
---|
Will close ticket in 1 month if no follow-up. Thanks.
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I replaced the use of
datetime.datetime.now()
withtrac.util.datefmt.to_datetime()
.The following are equivalent:
Could you test the version on the trunk and report back if you still have the issue? (Note, I removed the 0.11 and 0.12 branches since they were equivalent, and now there is currently just a trunk)