|
|

楼主 |
发表于 2017-8-19 09:19:18
|
显示全部楼层
贴图没办法贴出来 
只好用文字版了,第一个报错是:
============== RESTART: C:\Users\Administrator\Desktop\open.py ==============
请输入文件名:aa.txt
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\open.py", line 16, in <module>
filewrite(file_name)
File "C:\Users\Administrator\Desktop\open.py", line 2, in filewrite
f=open(file_name,'w'),
TypeError: expected str, bytes or os.PathLike object, not tuple
>>>
第2个是:
============== RESTART: C:\Users\Administrator\Desktop\test.py ==============
请输入文件名:aa.txt
单独输入:w保存退出
aa
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\test.py", line 14, in <module>
file_new(filename)
File "C:\Users\Administrator\Desktop\test.py", line 8, in file_new
f.write('%s\n' %content)
AttributeError: 'tuple' object has no attribute 'write'
>>>
|
|