[TurboGears] #863: Cryptic error message for configuration syntax error

4 views
Skip to first unread message

TurboGears

unread,
May 11, 2006, 5:49:51 AM5/11/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Keywords:
------------------------+---------------------------------------------------
Adding line like "kid.encoding = latin1" (note missing quotes over latin1)
yields the following cryptic traceback:

{{{
Traceback (most recent call last):
File "D:\Projects\z01\start-z01.py", line 21, in ?
modulename="z01.config")
File "d:\projects\3rd-party\turbogears-1.0\turbogears\config.py", line
183, in update_config
configdata2 = ConfigObj(configfile, unrepr=True)
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 1055, in __init__
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 1323, in _parse
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 1491, in
_handle_value
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 203, in unrepr
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 157, in build
File "C:\Python24\lib\site-
packages\configobj-4.3.0-py2.4.egg\configobj.py", line 184, in build_Name
configobj.UnknownType: Undefined Name
}}}

TurboGears should be more user-friendly here, at least explaining there
was a syntax error and at best giving exact error location.

--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/863>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

TurboGears

unread,
May 15, 2006, 4:00:56 PM5/15/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: fuzz...@voidspace.org.uk
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by fuzz...@voidspace.org.uk):

* owner: anonymous => fuzz...@voidspace.org.uk

Comment:

This is a ConfigObj issue, and will be addressed.

I *should* be able to add a line number. What would you prefer the error
message to say ?
(Given that in ''unrepr'' mode, ConfigObj is expecting a valid Python
expression.)

Fuzzyman

TurboGears

unread,
May 15, 2006, 4:01:20 PM5/15/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: Fuzzyman
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by anonymous):

* owner: fuzz...@voidspace.org.uk => Fuzzyman

TurboGears

unread,
May 21, 2006, 4:17:15 PM5/21/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: Fuzzyman
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by Fuzzyman):

This should be fixed in ConfigObj 4.3.2 (now in subversion)

See :

http://www.voidspace.org.uk/python/weblog/arch_d7_2006_05_20.shtml#e336

Fuzzyman

TurboGears

unread,
May 24, 2006, 12:20:01 AM5/24/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: Fuzzyman
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by max):

* cc: => isch...@gmail.com

Comment:

OK, but I cannot verify it until 4.3.2 can be installed with easy_install.

TurboGears

unread,
May 31, 2006, 3:44:06 AM5/31/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: Fuzzyman
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a6
Severity: normal | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Changes (by jorge.vargas):

* version: 0.9a5 => 0.9a6

Comment:

a diferent issue but a cryptic error too

Traceback (most recent call last):
File "/usr/local/bin/tg-admin", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-
py2.4.egg/turbogears/command/base.py", line 274, in main
command = command.load()(turbogears.__version__)
File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-
py2.4.egg/turbogears/command/base.py", line 101, in __init__
self.find_config()
File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-
py2.4.egg/turbogears/command/base.py", line 66, in find_config
load_project_config(self.config)
File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-
py2.4.egg/turbogears/command/base.py", line 54, in load_project_config
modulename = package + ".config")
File "/usr/lib/python2.4/site-packages/TurboGears-0.9a6-
py2.4.egg/turbogears/config.py", line 183, in update_config
configdata2 = ConfigObj(configfile, unrepr=True)
File "/usr/lib/python2.4/site-
packages/ConfigObj-4.3.1-py2.4.egg/configobj.py", line 1077, in __init__
configobj.ConfigObjError: Parsing failed.

this happens when you have 2 keys inside the same section with the same
name, which will become a common problem ones people start not seeing the
default uncommented sqlobject.dburi in dev.cfg

TurboGears

unread,
Aug 1, 2006, 12:05:37 PM8/1/06
to turbogear...@googlegroups.com
#863: Cryptic error message for configuration syntax error
------------------------+---------------------------------------------------
Reporter: max | Owner: Fuzzyman
Type: defect | Status: closed
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a6
Severity: normal | Resolution: fixed
Keywords: |
------------------------+---------------------------------------------------
Changes (by fuzzyman):

* status: new => closed
* resolution: => fixed

Comment:

All these issues *should* have been addressed by ConfigObj 4.3.2.

Once this is included in Turbogears, this ticket can be closed. Further
issues should be raised in a new ticket.
Reply all
Reply to author
Forward
0 new messages