Python Forum
io.UnsupportedOperation: fileno
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
io.UnsupportedOperation: fileno
#1
I'm using Python 3.11.4 (64-bit) on windows 11.
I've installed libraries from the book, Introduction to Python Programming.
One of these is called stdio. From a Python prompt, I can import stdio and it works fine.
When I try to run the following program from IDLE, however, I get the error message below.

#-----------------------------------------------------------------------
# helloworld.py
#-----------------------------------------------------------------------

import stdio

# Write 'Hello, World' to standard output.
stdio.writeln('Hello, World')
Traceback (most recent call last):
File "D:\LANGS\Python Programs\introcs-python\helloworld.py", line 5, in <module>
import stdio
File "C:\Users\tlake\AppData\Roaming\Python\Python311\site-packages\stdio.py", line 31, in <module>
sys.stdin = open(sys.stdin.fileno(), 'r', newline=None)
io.UnsupportedOperation: fileno


What's going on?
Reply


Messages In This Thread
io.UnsupportedOperation: fileno - by toml12953 - Jun-13-2023, 01:11 AM
RE: io.UnsupportedOperation: fileno - by deanhystad - Jun-13-2023, 03:17 AM
RE: io.UnsupportedOperation: fileno - by toml12953 - Jun-15-2023, 08:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  io.UnsupportedOperation: not readable RedSkeleton007 2 18,877 Nov-06-2023, 06:32 AM
Last Post: gpurdy
  io.UnsupportedOperation: not readable navidmo 1 3,558 Oct-31-2019, 11:04 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020