It looks stupid but I can't handle this issue.
cwd = os.getcwd()
os.chdir(cwd)
file_name = 'tes.txt'
with open(file_name, 'w+') as f:
f.write('hhhh')
f.close()
when I start this simple code it always returns me
with open(file_name, 'w+') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'test.txt'
On other computer the same code works well, as expected.
If I'm trying to address to file which already exists
cwd = os.getcwd()
os.chdir(cwd)
# print(os.listdir(cwd))
file_name = 'tether_full_data.txt'
with open(file_name, 'w+') as f:
f.write('hhhh')
f.close()
it returns
OSError: [Errno 9] Bad file descriptor
I did a lot of search and tried a lot of ways. But with no success on this PC (only on this PC).
Windows 10 PRO, version 1709, OS Build 16299.19