Bugs item #990743, was opened at 2004-07-14 11:05 Message generated for change (Settings changed) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=990743&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Unicode Group: Python 2.3 >Status: Closed >Resolution: Works For Me Priority: 5 Submitted By: Jurjen N.E. Bos (jneb) Assigned to: Martin v. Löwis (loewis) Summary: Crash when importing encoded file Initial Comment: Python crashes (!) when it meets a non-ascii character in a file with encoding in use. For example: <file foo.py> # encoding: mac-roman ... <square root character> <in Python> >>> import user #so we can import >>> import foo Parser/tokenizer.c:366: failed assertion `strlen(str) < (size_t)size' Abort When debugging, I found the StreamReader.readline() routine in codecs.py. It self.calls decode, which does return well; then readline returns, and then the inevitable happens. Readline is called straight from the toplevel (from the viewpoint of the debugger), which probably means calling readline is part of the import logic in C. So the bug must somewhere in there... - Jurjen ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2005-08-25 13:31 Message: Logged In: YES user_id=21627 Some time has passed, and now I fail to reproduce the problem. It would have helped if you had attached the actual file that causes the bug, and if you had stated the precise Python version and platform on which this bug occurred. So I'm closing this as "works for me". If you can provide further details, and it hasn't been fixed in 2.4, please submit a new report. ---------------------------------------------------------------------- Comment By: M.-A. Lemburg (lemburg) Date: 2004-07-23 12:13 Message: Logged In: YES user_id=38388 Martin, could you have a look at this ? Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=990743&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com