[Python-bugs-list] [Bug #121791] Error for bad \x escape doesn't mention filename
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 6 Nov 2000 09:04:53 -0800
Bug #121791, was updated on 2000-Nov-06 08:34
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Error for bad \x escape doesn't mention filename
Details: Using:
GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
I get the following 'error' message:
from interscript.languages.interscript_languages import add_translation
File "interscript/languages/interscript_languages.py", line 2, in ?
from interscript.encoding.utf8 import utf8
ValueError: invalid \x escape
in known correct code (i.e. it works on Python 1.5.2).
I have examined the function 'parsestr' in
'compile.c', and added debugging prints to find out
what is going on. The function _correctly_ processes
the string 'utf8' (quotes included), and returns,
then the error is generated _without_ entering
the routine!
This almost certainly must be a bug in egcs-2.91.66.
The code in 'parsestr' looks correct to me.
It is possible the error can be replicated by
downloading and running 'interscript' (without
any arguments). Interscript is available at
http://interscript.sourceforge.net
[Reply to skaller@maxtal.com.au, sorry, I couldn't
figure out how to 'log on']
Follow-Ups:
Date: 2000-Nov-06 09:04
By: gvanrossum
Comment:
The error message is legitimate: in Python 2.0, \x escapes must have exactly two hex characters following, and he uses \x0\x0 in his __init__.py module, which generates the error message.
But his bug report is also legitimate: the ValueError doesn't mention the file where this is occurring! I'm changing the bug subject to reflect this -- it has nothing to do with egcs 2.91.66.
I'm randomly assigning this to Tim.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121791&group_id=5470