AREPL-vscode icon indicating copy to clipboard operation
AREPL-vscode copied to clipboard

error when opening file descriptor directly

Open Almenon opened this issue 5 years ago • 2 comments
trafficstars

Describe the bug In arepl v1.0.24 the following error happens

Traceback (most recent call last):
  line 2, in <module>
OSError: [WinError 6] The handle is invalid

To Reproduce

print('hi', file=open(1,'w'))
print('hi', file=open(1,'w'))

Expected behavior The following print results are outputted:

hi
hi

Screenshots If applicable, add screenshots to help explain your problem.

Other Information (please complete the following information):

  • OS: Windows 10
  • Python Version: 3.8.1

Additional context The workaround is using sys.stdout instead of open(1,'w')

Almenon avatar May 23 '20 17:05 Almenon

I'm pretty sure this is a backend-related error - I opened https://github.com/Almenon/AREPL-backend/issues/125

Almenon avatar May 23 '20 17:05 Almenon

If you run into this problem please comment to let me know.

Almenon avatar May 23 '20 17:05 Almenon