Modify

Opened 16 years ago

Closed 15 years ago

#3973 closed defect (fixed)

TypeError: not enough arguments for format string

Reported by: Carlos Eduardo Nissola Migliavacca Owned by: Colin Guthrie
Priority: high Component: ClientsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

Hi,

Im using trac 0.11 and when I add a Client this error occurs, im using sqlite database.

Another thing: How can i add addicional fields to an client, I wanna add an ID, to refer the client in another software.

Thanks, Carlos

How to Reproduce

While doing a POST operation on /admin/ticket/clients, Trac issued an internal error.

Request parameters:

{'__FORM_TOKEN': u'04b33903abee07182a0d3e38',
 'add': u'Add',
 'cat_id': u'ticket',
 'name': u'1',
 'panel_id': u'clients',
 'path_info': None}

User Agent was: Mozilla/5.0 (X11; U; Linux x86_64; pt-BR; rv:1.9.0.3) Gecko/2008092510 Ubuntu/8.04 (hardy) Firefox/3.0.3

System Information

Trac 0.11.1
Python 2.5.2 (r252:60911, Jul 31 2008, 17:49:46)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
setuptools 0.6c8
SQLite 3.4.2
pysqlite 2.4.0
Genshi 0.6dev-r960
mod_python 3.3.1
Subversion 1.4.6 (r28521)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/admin/web_ui.py", line 113, in process_request
    path_info)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/admin.py", line 43, in render_admin_panel
    return self._render_admin_panel(req, cat, page, version)
  File "build/bdist.linux-x86_64/egg/clients/admin.py", line 61, in _render_admin_panel
    clnt.insert()
  File "build/bdist.linux-x86_64/egg/clients/model.py", line 80, in insert
    self.default_rate, self.currency))
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/sqlite_backend.py", line 56, in execute
    sql = sql % (('?',) * len(args))
TypeError: not enough arguments for format string

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by Colin Guthrie

Status: newassigned

I actually fixed this just this morning :) See #3948 and [4560].

As for adding a new field there is no way to do this just now but adding a reference or external id seems like a fairly generic thing so I'll add it to the standard fields.

That said depending on how you want to integrate the client with this external system, it may be more appropriate to define an "action" which then allows you to put in per-client data specific to that action.... I'd guess that this doesn't apply to your needs tho'.

comment:2 in reply to:  1 Changed 16 years ago by Carlos Eduardo Nissola Migliavacca

Replying to coling:

I actually fixed this just this morning :) See #3948 and [4560].

As for adding a new field there is no way to do this just now but adding a reference or external id seems like a fairly generic thing so I'll add it to the standard fields.

That said depending on how you want to integrate the client with this external system, it may be more appropriate to define an "action" which then allows you to put in per-client data specific to that action.... I'd guess that this doesn't apply to your needs tho'.

Thanks for your help!

comment:3 Changed 15 years ago by Colin Guthrie

Resolution: fixed
Status: assignedclosed

See #3974 for the adding of an external client id tracking. Not sure when I'll get round to this but there is no point in keeping this bug open (I have too many of those!!!) to track it, especially when the main subject of the bug has been fixed :)

Modify Ticket

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