Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#51 closed defect (fixed)

trac internal error when attaching a file to a ticket

Reported by: stefan Owned by: somebody
Priority: major Component: Wiki documentation
Version: 0.5 Keywords: trac ticket
Cc:

Description

Hi,

I don't know whether I'm on the right place here.

On Osi I once created a ticket which requests for an enhancement and attached a patch file which implements this enhancement. Now I want to update this patch file to make it working with the current Osi revision. However, when I try to attach my patch file (which has the same name as before) and mark the box "Replace existing attachment of the same name", then I get the following error:

Oops…
Trac detected an internal error:

If you think this really should work and you can reproduce it, you should consider reporting this problem to the Trac team.

Go to http://trac.edgewall.org/ and create a new ticket where you describe the problem, how to reproduce it. Don't forget to include the Python traceback found below.

TracGuide — The Trac User and Administration Guide
Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 361, in process_request
    self._do_save(req, attachment)
  File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 496, in _do_save
    attachment.insert(filename, upload.file, size)
  File "/usr/lib/python2.3/site-packages/trac/attachment.py", line 183, in insert
    filename))
  File "/usr/lib/python2.3/site-packages/trac/util/__init__.py", line 112, in create_unique_file
    raise Exception('Failed to create unique name: ' + path)
Exception: Failed to create unique name: /home/coin/Trac/Projects/Osi/attachments/ticket/35/osiglpk.100.patch

Best, Stefan

Change History (5)

comment:1 Changed 12 years ago by mjs

This appears to be a Trac bug. The upstream ticket is http://trac.edgewall.org/ticket/5848.

comment:2 Changed 12 years ago by stefan

Yes, it is a trac bug. But the error messages in ticket 5848 on the trac-page look different.

I did not have a problem when I first attached my patch-file, only when I tried to update / overwrite it.

comment:3 Changed 12 years ago by mjs

OK I filed http://trac.edgewall.org/ticket/5851 upstream. You'll recognize the content... (I'm not proud 8-).)

As a workaround, can you try attaching with a different name and a comment indicating it supersedes the old patch?

comment:4 Changed 12 years ago by andreasw

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

comment:5 Changed 11 years ago by solar

wuchangxianxie inc Solar Hot Water Heater, Solar Light System - Lights Manufacturers, Suppliers, for Exports - Solar Water Heater Solar Cell Panel Non pressurized Water Heater phone:010-6483829 http://www.solar-water-heaters.com.cn

Note: See TracTickets for help on using tickets.