Message374119
#41300 fixed one bug in the patch for #41158. A user reported another on on idle-dev list. Create a file in Windows Explorer. Leave as .txt or rename to .py. Right click and Edit with IDLE 3.8 (.4/.5 or 3.9.0b4 or 5). Edit works, Save (or Run) does not. Open the same file from Command Prompt, change it, and trying to save produces
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Programs\Python38\lib\tkinter\__init__.py", line 1883, in __call__
return self.func(*args)
File "C:\Programs\Python38\lib\idlelib\multicall.py", line 176, in handler
r = l[i](event)
File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 200, in save
if self.writefile(self.filename):
File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 232, in writefile
text = self.fixnewlines()
File "C:\Programs\Python38\lib\idlelib\iomenu.py", line 252, in fixnewlines
text = text.replace("\n", self.eol_convention)
TypeError: replace() argument 2 must be str, not None
The replacement line is guarded with
if self.eol_convention != "\n":
Either the condition should be include 'and self.eol_convention is not None' or the setting of the attribute should be changed. I will look into how it was set before the #41158 patch. |
|
Date |
User |
Action |
Args |
2020-07-23 03:47:16 | terry.reedy | set | recipients:
+ terry.reedy |
2020-07-23 03:47:16 | terry.reedy | set | messageid: <1595476036.59.0.577119776706.issue41373@roundup.psfhosted.org> |
2020-07-23 03:47:16 | terry.reedy | link | issue41373 messages |
2020-07-23 03:47:16 | terry.reedy | create | |
|