Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#8232 closed defect (duplicate)

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Reported by: valentin.balt@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

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

(please provide additional details here)

Request parameters:

{'action': 'get-file', 'id': u'4'}

User Agent was: Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.0.8) Gecko/2009032600 SUSE/3.0.8-1.1.1 Firefox/3.0.8

System Information

Trac 0.11.4
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)]
setuptools 0.6c9
MySQL server: "5.0.51a", client: "5.0.51a", thread-safe: 0
MySQLdb 1.2.1_p2
Genshi 0.5.1
mod_python 3.3.1
Subversion 1.4.4 (r25188)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 435, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 205, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/tracdownloads/core.py", line 75, in process_request
    return api.process_downloads(context) + (None,)
  File "build/bdist.linux-i686/egg/tracdownloads/api.py", line 276, in process_downloads
    self._do_action(context, modes)
  File "build/bdist.linux-i686/egg/tracdownloads/api.py", line 378, in _do_action
    new_download = {'count' : download['count'] + 1}
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Attachments (0)

Change History (1)

comment:1 by anonymous, 16 years ago

Resolution: duplicate
Status: newclosed

update download set count = 0 where count is null;

Just run this SQL statement.

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.