Edgewall Software
Modify

Opened 6 years ago

Last modified 3 years ago

#11280 new defect

"ValueError: incomplete format key" occurs repeatedly

Reported by: anonymous Owned by:
Priority: normal Milestone: next-stable-1.2.x
Component: general Version: 1.0
Severity: normal Keywords: config
Cc: Branch:
Release Notes:
API Changes:

Description

"Value Error" occurs when I set "%(" in configuration value of Administration. (e.g. Administration - General - Basic Settings - Description) And Once "Value Error" occured, same error occurs on most of pages until I restart Trac process.

System Information

Trac 1.0
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
Babel 0.9.6
Docutils 0.7
Genshi 0.6
mod_wsgi 3.4
Pygments 1.4
pysqlite 2.6.0
setuptools 0.6c11
SQLite 3.6.21
Subversion 1.7.7
jQuery 1.7.2

OS: Windows Server 2003 x86 SP2

Python Traceback

Traceback (most recent call last):
  File "C:\python\lib\site-packages\trac-1.0-py2.7.egg\trac\web\api.py", line 504, in send_error
    data, 'text/html')
  File "C:\python\lib\site-packages\trac-1.0-py2.7.egg\trac\web\chrome.py", line 961, in render_template
    data = self.populate_data(req, data)
  File "C:\python\lib\site-packages\trac-1.0-py2.7.egg\trac\web\chrome.py", line 817, in populate_data
    'descr': self.env.project_description,
  File "C:\python\lib\site-packages\trac-1.0-py2.7.egg\trac\config.py", line 661, in __get__
    value = self.accessor(section, self.name, self.default)
  File "C:\python\lib\site-packages\trac-1.0-py2.7.egg\trac\config.py", line 400, in get
    value = self.config.parser.get(name_str,key_str)
  File "C:\python\lib\ConfigParser.py", line 623, in get
    return self._interpolate(section, option, value, d)
  File "C:\python\lib\ConfigParser.py", line 666, in _interpolate
    value = value % vars
ValueError: incomplete format key

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 6 years ago

Keywords: config added
Milestone: next-stable-1.0.x
  File "C:\python\lib\ConfigParser.py", line 666, in _interpolate

Ah right, the interpolate from hell ;-)

This is related to the topics discussed in #9091 and #9674.

I'm leaving this issue opened though instead of closing as duplicate, as we may want to start by fixing this specific issue by making the saved description "interpolation safe".

comment:2 by Ryan J Ollos, 3 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned. Next status will be 'new'.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.