This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Strange error message in Python/getargs.c
Type: Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, mishok13
Priority: normal Keywords:

Created on 2009-03-27 15:35 by mishok13, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg84264 - (view) Author: Andrii V. Mishkovskyi (mishok13) Date: 2009-03-27 15:35
I think the following message is a little bit confusing:
Python 2.7a0 (trunk, Mar 17 2009, 12:06:19)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> open('abc\x00')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: file() argument 1 must be (encoded string without NULL
bytes), not str

This message could be much more better if unneeded parentheses were
removed. :)
The message on line 861 in Python/getargs.c reads much better:
"string without null bytes"
Would it be appropriate to change the message in topic to something like
this?
msg85486 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 11:54
Fixed in r71225.
History
Date User Action Args
2022-04-11 14:56:47adminsetgithub: 49830
2009-04-05 11:54:14georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg85486

resolution: fixed
2009-03-27 15:35:57mishok13create