Message258744
when an unicode option.default_value could not be ascii encoded, it would throw exception, detailed logs below:
File "/Users/seanwang/Documents/dev/foo/bar.py", line 119, in main
parser.print_help()
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1670, in print_help
file.write(self.format_help().encode(encoding, "replace"))
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1650, in format_help
result.append(self.format_option_help(formatter))
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1630, in format_option_help
result.append(OptionContainer.format_option_help(self, formatter))
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 1074, in format_option_help
result.append(formatter.format_option(option))
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 316, in format_option
help_text = self.expand_default(option)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py", line 288, in expand_default
return option.help.replace(self.default_tag, str(default_value))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-4: ordinal not in range(128) |
|
Date |
User |
Action |
Args |
2016-01-21 08:22:27 | Sean.Wang | set | recipients:
+ Sean.Wang, loewis, akuchling, gward, bethard, ivilata, vstinner, aronacher, ezio.melotti, ash, eric.araujo, sampablokuper |
2016-01-21 08:22:27 | Sean.Wang | set | messageid: <1453364547.59.0.107297265589.issue2931@psf.upfronthosting.co.za> |
2016-01-21 08:22:27 | Sean.Wang | link | issue2931 messages |
2016-01-21 08:22:27 | Sean.Wang | create | |
|