New submission from anatoly techtonik:

Awesome json tool doesn't work anymore in Python 3 (needs tests?).
http://stackoverflow.com/questions/352098/how-to-pretty-print-json-script

C:\Python27>python -m json.tool stdlibx.json
{
    "distutils": [
        "Doc/distutils",
        "Lib/distutils",
        "Lib/test/test_distutils.py"
    ],
    "json": [
        "Doc/library/json.rst",
        "Lib/json",
        "Lib/test/json_tests",
        "Lib/test/test_json.py"
    ]
}

C:\Python33>python -m json.tool stdlibx.json
Traceback (most recent call last):
  File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python33\lib\runpy.py", line 73, in _run_code
    exec(code, run_globals)
  File "C:\Python33\lib\json\tool.py", line 37, in <module>
    main()
  File "C:\Python33\lib\json\tool.py", line 29, in main
    obj = json.load(infile)
  File "C:\Python33\lib\json\__init__.py", line 264, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "C:\Python33\lib\json\__init__.py", line 309, in loads
    return _default_decoder.decode(s)
  File "C:\Python33\lib\json\decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object

----------
files: stdlibx.json
messages: 176324
nosy: techtonik
priority: normal
severity: normal
status: open
title: regression: -m json.tool module
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file28100/stdlibx.json

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16549>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to