Modify

Opened 7 years ago

Closed 5 years ago

#2152 closed defect (fixed)

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

Reported by: Blackhex Owned by: Blackhex
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 7 years ago by Blackhex

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

Fixed with r2152.

comment:2 Changed 6 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Trac Release changed from 0.10 to 0.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 5 years ago by anonymous

comment:4 Changed 5 years ago by Blackhex

Thanks, I'll fix it soon.

comment:5 Changed 5 years ago by Blackhex

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

Fixed for 0.11 and 0.12 branch with r5599.

Add Comment

Modify Ticket

Action
as 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.