Comment 1 for bug 1647925

Revision history for this message
David Wyde (david-wyde) wrote :

I think I can reproduce with a filename containing non-ASCII characters:

$ python -c 'open(u"\xee.py", "w").write("=")'
$ bandit *.py
[main] INFO profile include tests: None
[main] INFO profile exclude tests: None
[main] INFO cli include tests: None
[main] INFO cli exclude tests: None
[main] INFO running on Python 2.7.10
[node_visitor] INFO Unable to find qualified name for module: î.py
Traceback (most recent call last):
  File "/usr/local/bin/bandit", line 10, in <module>
    sys.exit(main())
  File "/Users/dwyde/code/bandit/bandit/cli/main.py", line 345, in main
    args.output_format)
  File "/Users/dwyde/code/bandit/bandit/core/manager.py", line 151, in output_results
    "%s" % (output_format, str(e)))
RuntimeError: Unable to output report using 'screen' formatter: 'ascii' codec can't decode byte 0xcc in position 2: ordinal not in range(128)