Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8604 closed defect (duplicate)

TypeError: a float is required

Reported by: zis Owned by:
Priority: normal Milestone:
Component: database backend Version: 0.11.5
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christian Boos)

How to Reproduce

While doing a GET operation on /wiki, Trac issued an internal error.

when I used trac as a cgi module, everything was ok, but very slow. After I installed mod_python and changed my httpd.conf, I have such an error. My httpd.conf section:

<Location "/trac">
SetHandler mod_python
      PythonInterpreter main_interpreter
      PythonHandler trac.web.modpython_frontend 
      PythonOption TracEnv "/usr/share/trac/projects/vegspace_ru"
</Location>"

User Agent was: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ru; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2

System Information

Trac 0.11.5
Python 2.5.4 (r254:67916, Jul 23 2009, 04:25:45)
[GCC 3.4.6 [FreeBSD] 20060305]
setuptools 0.6c9
MySQL server: "5.1.36", client: "5.0.67", thread-safe: 0
MySQLdb 1.2.3c1
Genshi 0.5.1
mod_python 3.3.1
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 205, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/wiki/web_ui.py", line 118, in process_request
    page = WikiPage(self.env, pagename)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/wiki/model.py", line 43, in __init__
    self._fetch(name, version, db)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/wiki/model.py", line 70, in _fetch
    self.time = datetime.fromtimestamp(time, utc)
TypeError: a float is required

Attachments (0)

Change History (6)

comment:1 by bmziskin@…, 15 years ago

Resolution: fixed
Status: newclosed

I changed /usr/local/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/wiki/model.py a little: self.time = datetime.fromtimestamp(int(time), utc) works correct

comment:2 by Christian Boos, 15 years ago

Component: generaldatabase backend
Description: modified (diff)
Keywords: mysql added
Milestone: 0.11.6
Resolution: fixed
Status: closedreopened

Hold on, it's only fixed for you, so far ;-)

Thanks for the report and the hint about the fix.

comment:3 by Christian Boos, 15 years ago

Milestone: 0.11.6
Resolution: duplicate
Status: reopenedclosed

It's a duplicate of #8233.

in reply to:  3 comment:4 by Remy Blank, 15 years ago

Replying to cboos:

It's a duplicate of #8233.

I'm not sure about that. None doesn't convert to int, so the fix in comment:1 wouldn't work.

comment:5 by Christian Boos, 15 years ago

zis, any chance you could do a print repr(time) before that line?

in reply to:  5 comment:6 by Remy Blank, 15 years ago

Replying to cboos:

zis, any chance you could do a print repr(time) before that line?

I was going to suggest:

print type(time), repr(time)

but then I got a mid-air collision with your comments ;-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.