Modify

Opened 11 years ago

Closed 11 years ago

#11273 closed defect (fixed)

AttributeError: 'unicode' object has no attribute 'file'

Reported by: lyon.jeffrey@… Owned by: Ryan J Ollos
Priority: normal Component: AwesomeAttachmentsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description

Error occurred when submitting a new ticket with no attachments.

Trac error: "Note that the AwesomeAttachmentsPlugin plugin seems to be involved. Please report this issue to the plugin maintainer."

Trac detected an internal error:
AttributeError: 'unicode' object has no attribute 'file'

Python Traceback:

Most recent call last: 

File "/usr/local/python/lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 497, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/python/lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 214, in dispatch
  resp = chosen_handler.process_request(req)
File "/usr/local/python/lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/ticket/web_ui.py", line 180, in process_request
  return self._process_newticket_request(req)
File "/usr/local/python/lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/ticket/web_ui.py", line 465, in _process_newticket_request
  self._do_create(req, ticket) # (redirected if successful)
File "build/bdist.linux-x86_64/egg/awesome/awesomeattachments.py", line 100, in _do_create
  self._create_attachment(req, ticket, req.args['attachment[]'], req.args['description[]'])
File "build/bdist.linux-x86_64/egg/awesome/awesomeattachments.py", line 58, in _create_attachment
  if hasattr(upload.file, 'fileno'):

System Information:

User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2; .NET4.0C; .NET4.0E)

Trac 1.0.1
Babel 0.9.6
Docutils 0.8.1
FullBlog 0.1.1
Genshi 0.6 (without speedups)
Pygments 1.4
pysqlite 2.6.0
Python 2.7.3 
pytz 2011n
RPC 1.1.2
setuptools 0.6
SQLite 3.7.3
Subversion 1.7.9 (r1462340)
jQuery 1.7.2

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by anonymous

I'm experiencing this behavior as well.

comment:2 Changed 11 years ago by Ryan J Ollos

Owner: changed from Dan Ordille to Ryan J Ollos
Status: newassigned

comment:3 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 13605:

0.3dev: Avoid exception when a ticket is created with no attachments. Fixes #11273.

Modify Ticket

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