Modify

Opened 12 years ago

Closed 12 years ago

#10208 closed defect (fixed)

Internal server error 500 after file attached

Reported by: erictioh84@… Owned by: Jun Omae
Priority: normal Component: TracDragDropPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Got this error after the upload progress bar finished. Hit browser refresh and files shown uploaded successfully and the error message gone. I'm using firefox

Attachments (1)

Capture.PNG (9.0 KB) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by anonymous

Attachment: Capture.PNG added

comment:1 Changed 12 years ago by Jun Omae

Could you please provide trac.log if possible? And, are you using Trac 1.0? (1.0 is not released yet)

Thanks.

comment:2 Changed 12 years ago by erictioh84@…

Yes i'm using 1.0 DEV, since i saw this plugin supporting 1.0 on the main page of trac hack.

Perhaps is the compatibility between yours and trac 1.0 (Because it was ok with 0.12). And you might need to check make it support if this is a bug in your plugin, and get ready to work with 1.0 (I love your plugin, best of the best :D)

[root@test log]# cat trac.log
2012-07-30 21:53:15,309 Trac[main] DEBUG: Dispatching <Request "POST '/tracdragdrop/new/wiki/WikiStart'">
2012-07-30 21:53:15,317 Trac[session] DEBUG: Retrieving session for ID u'erictioh'
2012-07-30 21:53:15,321 Trac[main] DEBUG: Negotiated locale: None -> en_US
2012-07-30 21:53:15,332 Trac[api] WARNING: Unable to find repository '(default)' for synchronization
2012-07-30 21:53:15,333 Trac[chrome] DEBUG: Prepare chrome data for request
2012-07-30 21:53:15,355 Trac[attachment] INFO: New attachment: wiki:WikiStart: note.8.txt by erictioh
2012-07-30 21:53:15,365 Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions:
2012-07-30 21:53:15,365 Trac[api] DEBUG: AnnouncementSystem sent event in 0.01 seconds.
2012-07-30 21:53:15,393 Trac[__init__] DEBUG: ckintegration: template list_of_attachments.html
2012-07-30 21:53:15,401 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/web/main.py", line 490, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/web/main.py", line 224, in dispatch
    content_type)
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/web/chrome.py", line 1027, in render_template
    encoding='utf-8')
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/web/chrome.py", line 1164, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/web/chrome.py", line 1153, in _generate
    for kind, data, pos in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 565, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/usr/lib/python2.6/site-packages/Trac-1.0dev-py2.6.egg/trac/templates/list_of_attachments.html", line 28, in <Expression u'len(alist.attachments)'>
    <h3 class="${'foldable' if foldable else None}">Attachments <span class="trac-count">(${len(alist.attachments)})</span></h3>
TypeError: object of type 'generator' has no len()
2012-07-30 21:53:15,568 Trac[__init__] DEBUG: ckintegration: template error.html

comment:3 Changed 12 years ago by Jun Omae

(In [11842]) tracdragdrop: fixed showing "Internal Error 500" when uploading a file on Trac 1.0dev (refs #10208)

comment:4 in reply to:  2 Changed 12 years ago by Jun Omae

Replying to erictioh84@gmail.com:

Perhaps is the compatibility between yours and trac 1.0 (Because it was ok with 0.12). And you might need to check make it support if this is a bug in your plugin, and get ready to work with 1.0 (I love your plugin, best of the best :D)

Ok, Thanks a lot!

The issue has been fixed in [11842]. Please try it. But it still shows wrong the number of attachments after uploading a file. I'll fix it later and this ticket leaves as open.

comment:5 Changed 12 years ago by erictioh84@…

Tested, good on 1.0 Dev

comment:6 Changed 12 years ago by Jun Omae

Resolution: fixed
Status: newclosed

In [11965], tracdragdrop: refreshes number of attachments after uploading and deleting (closes #10208)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
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.