Almenon / Almenon/AREPL-vscode

error when opening file descriptor directly

Offen
#335 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
backend bug
Vorherrschende Sprache
TypeScript
Sterne
301
Forks
46
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

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

**To Reproduce**
```python
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')`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.