Bug 1044136 - [abrt] copr-cli-1.15-1.fc20: ConfigParser.py:546:_read:ParsingError: File contains parsing errors: /home/churchyard/.config/copr
Summary: [abrt] copr-cli-1.15-1.fc20: ConfigParser.py:546:_read:ParsingError: File con...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: copr
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:b07ec87847840fd039b5298a046...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 21:16 UTC by Miro Hrončok
Modified: 2014-01-10 07:46 UTC (History)
1 user (show)

Fixed In Version: copr-1.21-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-10 07:46:18 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (1.68 KB, text/plain)
2013-12-17 21:16 UTC, Miro Hrončok
no flags Details
File: environ (3.61 KB, text/plain)
2013-12-17 21:16 UTC, Miro Hrončok
no flags Details

Description Miro Hrončok 2013-12-17 21:16:24 UTC
Description of problem:
I've changed my token and login in the config, but I forgot to change the username.

Version-Release number of selected component:
copr-cli-1.15-1.fc20

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python2 /usr/bin/copr-cli build openscad-devel http://churchyard.fedorapeople.org/SRPMS/openscad-2013.12-0.2.20131215gite64bf96.fc20.src.rpm
dso_list:       python-libs-2.7.5-9.fc20.x86_64
executable:     /usr/bin/copr-cli
kernel:         3.11.10-301.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
ConfigParser.py:546:_read:ParsingError: File contains parsing errors: /home/churchyard/.config/copr
	[line  2]: '           username = msuchy\n'
	[line  3]: '           login = babooooo\n'
	[line  4]: '           token = hooooooo\n'

Traceback (most recent call last):
  File "/usr/bin/copr-cli", line 9, in <module>
    load_entry_point('copr-cli==0.1.0', 'console_scripts', 'copr-cli')()
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 125, in main
    arg.func(arg)
  File "/usr/lib/python2.7/site-packages/copr_cli/main.py", line 21, in action_build
    args.memory, args.timeout, not args.nowait)
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 197, in build
    user = get_user()
  File "/usr/lib/python2.7/site-packages/copr_cli/subcommands.py", line 24, in get_user
    'copr')):
  File "/usr/lib64/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib64/python2.7/ConfigParser.py", line 546, in _read
    raise e
ParsingError: File contains parsing errors: /home/churchyard/.config/copr
	[line  2]: '           username = msuchy\n'
	[line  3]: '           login = baboooo\n'
	[line  4]: '           token = hoooo\n'

Local variables in innermost frame:
sectname: 'copr-cli'
cursect: OrderedDict([('__name__', 'copr-cli')])
e: File contains parsing errors: /home/churchyard/.config/copr
	[line  2]: '           username = msuchy\n'
	[line  3]: '           login = babooooo\n'
	[line  4]: '           token = hooooooo\n'
fpname: '/home/churchyard/.config/copr'
mo: None
optname: None
fp: <open file '/home/churchyard/.config/copr', mode 'r' at 0x1d3b9c0>
lineno: 5
line: ''
self: <ConfigParser.ConfigParser instance at 0x1eb5908>

Comment 1 Miro Hrončok 2013-12-17 21:16:30 UTC
Created attachment 837980 [details]
File: backtrace

Comment 2 Miro Hrončok 2013-12-17 21:16:33 UTC
Created attachment 837981 [details]
File: environ

Comment 3 Miro Hrončok 2013-12-17 21:17:59 UTC
[copr-cli]
           username = churchyard
           login = Y29wcg==##laptsijpskfsnhlgtxnu
           token = lhzzcoypxdgutxqjufbznqtbxaksqf


(I've regenerated the token now, so I can publish it here)

So, this error was not because of wrong filename, but probably because the ## in the login.

Comment 4 Miro Hrončok 2013-12-17 21:24:58 UTC
So after all, this seems to be created by the indention on the beginning of the lines. Copied that from the manpage.

Comment 5 Miroslav Suchý 2013-12-18 09:17:04 UTC
fixed in commit 62a7525
copr-cli does not print TB now, just error and as bonus it gives you guidenance (as this will be probably common error):
Lines in INI file should not be indented.

In this case copr-cli will return status code 4.

Comment 6 Fedora Update System 2014-01-08 14:21:43 UTC
copr-1.20-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/copr-1.20-1.fc20

Comment 7 Fedora Update System 2014-01-09 07:38:47 UTC
Package copr-1.20-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing copr-1.20-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0449/copr-1.20-1.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-01-10 07:46:18 UTC
copr-1.21-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.