#11273 closed defect (fixed)

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

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


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/", line 497, in _dispatch_request
File "/usr/local/python/lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/web/", 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/", 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/", line 465, in _process_newticket_request
  self._do_create(req, ticket) # (redirected if successful)
File "build/bdist.linux-x86_64/egg/awesome/", line 100, in _do_create
  self._create_attachment(req, ticket, req.args['attachment[]'], req.args['description[]'])
File "build/bdist.linux-x86_64/egg/awesome/", 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 19 months ago by anonymous

I'm experiencing this behavior as well.

comment:2 Changed 16 months ago by rjollos

  • Owner changed from dan to rjollos
  • Status changed from new to assigned

comment:3 Changed 16 months ago by rjollos

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

In 13605:

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

Add Comment

Modify Ticket

as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.