Bug 1159316 - [abrt] python-libs: tool.py:24:main:IOError: [Errno 2] No such file or directory: 'grep'
Summary: [abrt] python-libs: tool.py:24:main:IOError: [Errno 2] No such file or direct...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bohuslav "Slavek" Kabrda
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:498ef4d926c3699d414f5057d44...
: 1167416 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-31 13:42 UTC by Javi Ribera
Modified: 2014-11-24 17:33 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-11-04 22:47:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (574 bytes, text/plain)
2014-10-31 13:42 UTC, Javi Ribera
no flags Details
File: environ (3.12 KB, text/plain)
2014-10-31 13:42 UTC, Javi Ribera
no flags Details

Description Javi Ribera 2014-10-31 13:42:04 UTC
Description of problem:
executing this instruction:
$ curl -s http://httpbin.org/ip | python -mjson.tool grep origin

Version-Release number of selected component:
python-libs-2.7.5-14.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        python -mjson.tool grep origin
executable:     /usr/lib64/python2.7/json/tool.py
kernel:         3.16.6-203.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
tool.py:24:main:IOError: [Errno 2] No such file or directory: 'grep'

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib64/python2.7/json/tool.py", line 40, in <module>
    main()
  File "/usr/lib64/python2.7/json/tool.py", line 24, in main
    infile = open(sys.argv[1], 'rb')
IOError: [Errno 2] No such file or directory: 'grep'

Local variables in innermost frame:

Comment 1 Javi Ribera 2014-10-31 13:42:06 UTC
Created attachment 952495 [details]
File: backtrace

Comment 2 Javi Ribera 2014-10-31 13:42:07 UTC
Created attachment 952496 [details]
File: environ

Comment 3 Thomas Spura 2014-10-31 13:49:34 UTC
True that this is a crash in the json module.

But don't you actually want to run:
curl -s http://httpbin.org/ip | python -mjson.tool | grep origin

Note the                                           ^

Comment 4 Javi Ribera 2014-11-04 22:47:08 UTC
I see this is the desired behaviour. The user input was wrong.

Comment 5 Thomas Spura 2014-11-24 17:33:47 UTC
*** Bug 1167416 has been marked as a duplicate of this bug. ***


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