Modify

Opened 16 years ago

Closed 15 years ago

#2152 closed defect (fixed)

!AttributeError: 'cStringIO.StringO' object has no attribute 'len'

Reported by: Radek Bartoň Owned by: Radek Bartoň
Priority: normal Component: DownloadsPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description

When trying to add a file for the first time:

Traceback (most recent call last): 
 File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request 
     dispatcher.dispatch(req) 
 File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 237, in dispatch 
     resp = chosen_handler.process_request(req) 
 File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r4240-py2.4.egg/webadmin/web_ui.py", line 109, in process_request
     path_info) 
 File "build/bdist.linux-i686/egg/tracdownloads/admin.py", line 45, in process_admin_request 
     content = api.process_downloads(req, cursor) 
 File "build/bdist.linux-i686/egg/tracdownloads/api.py", line 324, in process_downloads 
     self._do_action(req, cursor, modes) 
 File "build/bdist.linux-i686/egg/tracdownloads/api.py", line 503, in _do_action 
     file, file_name = self._get_file_from_req(req) 
 File "build/bdist.linux-i686/egg/tracdownloads/api.py", line 766, in _get_file_from_req 
     size = file.file.len 
AttributeError: 'cStringIO.StringO' object has no attribute 'len'

Attachments (0)

Change History (5)

comment:1 Changed 16 years ago by Radek Bartoň

Resolution: fixed
Status: newclosed

Fixed with r2152.

comment:2 Changed 15 years ago by anonymous

Resolution: fixed
Status: closedreopened
Trac Release: 0.100.11

I have this error, if try to download small file (less then 1 kb).

My system Information: Trac: 0.11.1; Python: 2.5.2; TracDownloads?: 0.2.

File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 197, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/lib/python2.5/site-packages/trac/admin/web_ui.py", line 113, in process_request
  path_info)
File "build/bdist.linux-x86_64/egg/tracdownloads/admin.py", line 43, in render_admin_panelFile "build/bdist.linux-x86_64/egg/tracdownloads/api.py", line 353, in process_downloadsFile "build/bdist.linux-x86_64/egg/tracdownloads/api.py", line 534, in _do_actionFile "build/bdist.linux-x86_64/egg/tracdownloads/api.py", line 813, in _get_file_from_req

comment:3 Changed 15 years ago by anonymous

comment:4 Changed 15 years ago by Radek Bartoň

Thanks, I'll fix it soon.

comment:5 Changed 15 years ago by Radek Bartoň

Resolution: fixed
Status: reopenedclosed

Fixed for 0.11 and 0.12 branch with r5599.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.