Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3380 closed defect (fixed)

Python croaks on datetime.strptime in python 2.4

Reported by: dan@… Owned by: echo0101
Priority: normal Component: TracTicketStatsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I get a python error when trying to change any of the parameters of the chart. It looks like you are trying to do an strptime on datetime which doesn't have it in Python 2.4. The time object has both strptime and strftime, but datetime only has strftime. You didn't indicate that your plugin required 2.5. It would be really nice if it didn't.

Here's the stacktrace: File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/main.py", line 197, in dispatch

resp = chosen_handler.process_request(req)

File "build/bdist.linux-i686/egg/ticketstats/ticketstats.py", line 136, in process_request

System Info: Trac: 0.11 Python: 2.4.3 (#1, May 24 2008, 13:47:28) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] setuptools: 0.6c8 SQLite: 3.3.6 pysqlite: 1.1.7 Genshi: 0.5.1 Pygments: 0.9 Subversion: 1.4.6 (r28521) jQuery: 1.2.3

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by echo0101

  • Owner changed from echo0101 to anonymous
  • Status changed from new to assigned

Thank you for this detailed description. I will look into making this plugin compatible with Python 2.4.

comment:2 Changed 6 years ago by echo0101

  • Owner changed from anonymous to echo0101
  • Status changed from assigned to new

comment:3 Changed 6 years ago by echo0101

  • Status changed from new to assigned

comment:4 Changed 6 years ago by echo0101

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [4014]. I do not have a Python 2.4 environment to test this on so please let me know if there are any more compatibility issues. Thanks.

comment:5 Changed 6 years ago by anonymous

Perfect! Thanks a bunch

Add Comment

Modify Ticket

Action
as closed The owner will remain echo0101.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.