Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error message in Python/getargs.c #49830

Closed
mishok13 mannequin opened this issue Mar 27, 2009 · 2 comments
Closed

Strange error message in Python/getargs.c #49830

mishok13 mannequin opened this issue Mar 27, 2009 · 2 comments

Comments

@mishok13
Copy link
Mannequin

mishok13 mannequin commented Mar 27, 2009

BPO 5580
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2009-04-05.11:54:14.496>
created_at = <Date 2009-03-27.15:35:57.759>
labels = []
title = 'Strange error message in Python/getargs.c'
updated_at = <Date 2009-04-05.11:54:14.493>
user = 'https://bugs.python.org/mishok13'

bugs.python.org fields:

activity = <Date 2009-04-05.11:54:14.493>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = <Date 2009-04-05.11:54:14.496>
closer = 'georg.brandl'
components = []
creation = <Date 2009-03-27.15:35:57.759>
creator = 'mishok13'
dependencies = []
files = []
hgrepos = []
issue_num = 5580
keywords = []
message_count = 2.0
messages = ['84264', '85486']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'mishok13']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue5580'
versions = ['Python 2.7']

@mishok13
Copy link
Mannequin Author

mishok13 mannequin commented Mar 27, 2009

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?

@birkenfeld
Copy link
Member

Fixed in r71225.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant