Modify

Opened 5 years ago

Closed 5 years ago

#4974 closed defect (fixed)

Error when trying to downloading file by clicking on link in Downloads list

Reported by: ilmars Owned by: Blackhex
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I successfully uploaded file in Admin section, there is file created in filesystem, permissions are ok. When I go to Downloads section, I see new file in list, but when I try to download it (click on link), I got:

Trac detected an internal error:

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

Python Traceback
Most recent call last:

# File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in  _dispatch_request
# File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
# File "build/bdist.linux-x86_64/egg/tracdownloads/core.py", line 75, in process_request
# File "build/bdist.linux-x86_64/egg/tracdownloads/api.py", line 276, in process_downloads
# File "build/bdist.linux-x86_64/egg/tracdownloads/api.py", line 378, in _do_action
   Local variables:
   Name	Value
   context 	<Context <Resource 'downloads-core'>>
   download 	{'count': None, 'description': u'Mar\u0137\u0113t\u0101ja 1.0 Beta ...
   download_file 	None
   download_id 	u'1'
   mode 	'get-file'
   modes 	['get-file']
   path 	u'/var/lib/trac/semti/downloads/1/annotator-r422.zip'
   self 	<tracdownloads.api.DownloadsApi object at 0x7f3d0089f250>

System info:

Trac:  	0.11
Python: 	2.5.2 (r252:60911, Oct 5 2008, 19:49:54) [GCC 4.3.2]
setuptools: 	0.6c9
SQLite: 	3.5.9
pysqlite: 	2.4.1
Genshi: 	0.5
mod_python: 	3.3.1
Pygments: 	0.10
Subversion: 	1.5.1 (r32289)
jQuery:	1.2.3

DonloadsPlugin - latest from SVN 0.11 branch (r5548), installed with easy_install <svn url>.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Blackhex

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

Changeset r5587 fixes that problem for newly added downloads. For all already present dowloads do SQL command in DB:

update download set count = 0 where count is null;

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Blackhex. Next status will be 'closed'.
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.