|
From: Michael F. <fuz...@vo...> - 2008-09-21 10:49:04
|
Jeffrey Barish wrote: > On Saturday 20 September 2008 18:55:17 Jeffrey Barish wrote: > >> Configobj was working fine until I switched to using unrepr mode. Now it >> works fine on one platform, but on another the same code produces the >> following error: >> >> ... >> File "/usr/lib/python2.5/site-packages/configobj.py", line 1272, in >> __init__ self._load(infile, configspec) >> File "/usr/lib/python2.5/site-packages/configobj.py", line 1355, in _load >> raise error >> configobj.ConfigObjError: Parsing failed with several errors. >> First error at line 3. >> >> Line 3 is: >> >> v = 0.77304964539007093 >> >> I am using version 4.5.3 on python 2.5.2. Considering that the same rc >> file works fine on the other platform, I am at a loss as to what to do. >> Any suggestions? >> > > The problem appears to arise because there is no compiler module on this > platform (Nokia N800). > > Do I have any options other than returning to code like > > if x == 'True' > unrepr mode relies on the compiler module - so it won't work on a platform that doesn't provide it. You could use validate and a configspec to convert types instead. Michael -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/ http://www.trypython.org/ http://www.ironpython.info/ http://www.theotherdelia.co.uk/ http://www.resolverhacks.net/ |