Bug 1295214

Summary: TypeError: 'map' object is not subscriptable
Product: [Fedora] Fedora Reporter: charlesvdv <charles.vandevoorde>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-04 12:33:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description charlesvdv 2016-01-03 16:57:13 UTC
Hello !

Description of problem:

If I launch dnf in commandline with any option (even nothing) I got this error on my terminal :

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 93, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 928, in configure
    opts, cmds = self.optparser.parse_known_args(args)
  File "/usr/lib/python3.4/site-packages/argparse-1.1-py3.4.egg/argparse.py", line 1754, in parse_known_args
    for dest in self._defaults:
  File "/usr/lib/python3.4/site-packages/argparse-1.1-py3.4.egg/argparse.py", line 1966, in _parse_known_args
    start_index = consume_optional(start_index)
TypeError: 'map' object is not subscriptable

and in systemd logs I got an error this error :

Message : Failed to start dnf makecache. 
Priority : 3
Subject : Unit dnf-makecache.service has failed 

Version-Release number of selected component (if applicable):

I can really say because I can't do "dnf --version" but I have a up-to-date system. 

How reproducible:

I don't really know how I got this bug in the first place so I don't know how to recreate it. Sorry guys.

Steps to Reproduce:
1.
2.
3.

Actual results:



Expected results:


Additional info:


I hope it's enough. It's my first bug report.

Thank a lot !

Comment 1 Jaroslav Mracek 2016-01-04 12:33:45 UTC
Please try to remove argparse-1.1-py3.4.egg from pip. Argparse is present in python by default. If it doesn't help, feel free to reopen the bug report. In this case please provide dnf version by command rpm -q dnf.