Issue 1001: 2to3 crashes on input files with no trailing newlines (original) (raw)

Issue1001

Created on 2007-08-23 19:54 by adrianholovaty, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg55195 - (view) Author: Adrian Holovaty (adrianholovaty) Date: 2007-08-23 20:00
The 2to3 Python 3k migration utility crashes with the following traceback on any input file that does *not* have a trailing newline. It doesn't seem to matter whether the input file needs modifications or not. RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad input: type=0, value='', context=('\n', (2, 0)) RefactoringTool: No files need to be modified. RefactoringTool: There was 1 error: RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad input: type=0, value='', context=('\n', (2, 0))
msg55197 - (view) Author: Adrian Holovaty (adrianholovaty) Date: 2007-08-23 20:13
(Sorry, the previous error snippet isn't a traceback as I had said. It's the error text.)
msg55710 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-09-06 18:01
I believe this was fixed in r57942; can you test to see if you still have this problem?
msg55711 - (view) Author: Adrian Holovaty (adrianholovaty) Date: 2007-09-06 18:23
I just checked, and, yes, it's been fixed.
History
Date User Action Args
2022-04-11 14:56:26 admin set github: 45342
2008-01-06 22:29:45 admin set keywords: - py3kversions: Python 3.0
2007-09-06 18:26:37 collinwinter set status: open -> closedresolution: fixed
2007-09-06 18:23:02 adrianholovaty set messages: +
2007-09-06 18:01:03 collinwinter set messages: +
2007-09-06 17:58:46 collinwinter set assignee: collinwintercomponents: + 2to3 (2.x to 3.x conversion tool), - Demos and Toolsnosy: + collinwinter
2007-08-30 16:34:24 loewis set versions: + Python 3.0
2007-08-29 03:09:59 jafo set priority: normal
2007-08-23 20:13:18 adrianholovaty set messages: +
2007-08-23 20:00:53 adrianholovaty set nosy: + adrianholovatymessages: +
2007-08-23 20:00:03 brett.cannon set keywords: + py3k
2007-08-23 19:54:02 adrianholovaty create