RuntimeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bandit |
Fix Released
|
Medium
|
Tim Kelsey |
Bug Description
ubuntu@
[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.12
3169 [0.. 50.. 100.. 150.. 200.. 250.. 300.. 350.. 400.. 450.. 500.. 550.. 600.. 650.. 700.. 750.. 800.. 850.. 900.. 950.. 1000.. 1050.. 1100.. 1150.. 1200.. 1250.. 1300.. 1350.. 1400.. 1450.. 1500.. 1550.. 1600.. 1650.. 1700.. 1750.. 1800.. 1850.. 1900.. 1950.. 2000.. 2050.. 2100.. 2150.. 2200.. 2250.. 2300.. 2350.. 2400.. 2450.. 2500.. 2550.. 2600.. 2650.. 2700.. 2750.. 2800.. 2850.. 2900.. 2950.. 3000.. 3050.. 3100.. 3150.. ]
Traceback (most recent call last):
File "/home/
sys.
File "/home/
args.
File "/home/
"%s" % (output_format, str(e)))
RuntimeError: Unable to output report using 'screen' formatter: 'ascii' codec can't encode characters in position 120758-120762: ordinal not in range(128)
I use pip to install bandit, and the version of ubuntu is Ubuntu Server 16.04.1 LTS x64.
Changed in bandit: | |
importance: | Undecided → Medium |
Changed in bandit: | |
assignee: | nobody → Tim Kelsey (tim-kelsey) |
I think I can reproduce with a filename containing non-ASCII characters:
$ python -c 'open(u"\xee.py", "w").write("=")' bin/bandit" , line 10, in <module> exit(main( )) dwyde/code/ bandit/ bandit/ cli/main. py", line 345, in main output_ format) dwyde/code/ bandit/ bandit/ core/manager. py", line 151, in output_results
$ 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/
sys.
File "/Users/
args.
File "/Users/
"%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)