Bug 622061

Summary: [abrt] virtaal-0.6.1-2.fc14: ConfigParser.py:536:_read:ParsingError: File contains parsing errors: /home/dwayne/.virtaal/virtaal.ini
Product: [Fedora] Fedora Reporter: Dwayne Bailey <dwayne>
Component: virtaalAssignee: Dwayne Bailey <dwayne>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: dwayne, fdrake
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:04e331b7
Fixed In Version: python-2.7-8.fc14.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-13 17:58:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 627557    
Bug Blocks:    
Description Flags
File: backtrace none

Description Dwayne Bailey 2010-08-06 22:51:23 UTC
abrt version: 1.1.10
architecture: i686
cmdline: /usr/bin/python /usr/bin/virtaal
component: virtaal
executable: /usr/bin/virtaal
kernel: 2.6.35-0.57.rc6.git1.fc14.i686.PAE
package: virtaal-0.6.1-2.fc14
reason: ConfigParser.py:536:_read:ParsingError: File contains parsing errors: /home/dwayne/.virtaal/virtaal.ini
release: Fedora release 14 (Branched)
time: 1281135012
uid: 500

ConfigParser.py:536:_read:ParsingError: File contains parsing errors: /home/dwayne/.virtaal/virtaal.ini
	[line 18]: 'plural\n'

Traceback (most recent call last):
  File "/usr/bin/virtaal", line 33, in <module>
    from virtaal.common import pan_app
  File "/usr/lib/python2.7/site-packages/virtaal/common/__init__.py", line 21, in <module>
    import pan_app
  File "/usr/lib/python2.7/site-packages/virtaal/common/pan_app.py", line 223, in <module>
    settings = Settings()
  File "/usr/lib/python2.7/site-packages/virtaal/common/pan_app.py", line 163, in __init__
  File "/usr/lib/python2.7/site-packages/virtaal/common/pan_app.py", line 167, in read
  File "/usr/lib/python2.7/ConfigParser.py", line 297, in read
    self._read(fp, filename)
  File "/usr/lib/python2.7/ConfigParser.py", line 536, in _read
    raise e
ParsingError: File contains parsing errors: /home/dwayne/.virtaal/virtaal.ini
	[line 18]: 'plural\n'

Local variables in innermost frame:
sectname: 'undo'
cursect: OrderedDict([('__name__', 'undo'), ('depth', '10000')])
e: File contains parsing errors: /home/dwayne/.virtaal/virtaal.ini
	[line 18]: 'plural\n'
fpname: '/home/dwayne/.virtaal/virtaal.ini'
vi: '='
mo: <_sre.SRE_Match object at 0x90b3660>
optname: 'depth'
fp: <open file '/home/dwayne/.virtaal/virtaal.ini', mode 'r' at 0x90a2bd0>
lineno: 31
line: ''
self: <ConfigParser.RawConfigParser instance at 0x914c7ac>
optval: '10000'

How to reproduce
1. Tried to lauch virtaal from the command line
2. The other launches from menu failed.

Comment 1 Dwayne Bailey 2010-08-06 22:51:26 UTC
Created attachment 437278 [details]
File: backtrace

Comment 2 Dwayne Bailey 2010-08-06 23:12:22 UTC
1. Delete virtaal.ini
2. App runs correctly
3. Exit
4. Relaunch and you crash

The reason is that line 18 is set to 'plural' with no value.

sourcelng = en
nplural = 0

Comment 3 Dwayne Bailey 2010-08-06 23:24:01 UTC
In Python 2.6 we output the string 'None' for plural if it's not defined.  But it seems that 2.7 doesn't do that.

Comment 4 Dwayne Bailey 2010-08-24 12:49:01 UTC
Package: virtaal-0.6.1-2.fc14
Architecture: i686
OS Release: Fedora release 14 (Branched)

How to reproduce
1. # rm -rf ~/.virtaal
2. # virtaal

Comment 5 Dwayne Bailey 2010-08-26 11:30:06 UTC
This is the change that seems to have introduced this bug into Virtaal:

Comment 6 Fred Drake 2010-09-03 04:27:47 UTC
Fixes have been committed to the Python 2.7 maintenance branch and the Python 3 devlopment branch to correct this problem; see the issue cited in comment 5 for details.

Python versions through 2.6.x and 3.1.x are not affected by this problem.

Comment 7 Dwayne Bailey 2010-12-13 17:58:25 UTC
The fix in python-2.7-8.fc14.1 see bug 627557 fixes this issue for Virtaal