@
snippsat checked my python's installation path. It was already
C:\Program Files (x86)\Python37-32
. After verifying with installer again, it seems when I go for custom installation and select 'Install for all users' this path is selected instead of 'appdata' path which is for single user.
Still just to be sure, I again installed it your way into
C:\Python37-32
but still the same error.
Also checked the 'Hidden items' and searched for 'io.py' in installed directory. There's no conflict here. For your reference contents of my 'io.py' located at 'C:\Python37-32\Lib' without module docstring.
# New I/O library conforming to PEP 3116.
__author__ = ("Guido van Rossum <[email protected]>, "
"Mike Verdone <[email protected]>, "
"Mark Russell <[email protected]>, "
"Antoine Pitrou <[email protected]>, "
"Amaury Forgeot d'Arc <[email protected]>, "
"Benjamin Peterson <[email protected]>")
__all__ = ["BlockingIOError", "open", "IOBase", "RawIOBase", "FileIO",
"BytesIO", "StringIO", "BufferedIOBase",
"BufferedReader", "BufferedWriter", "BufferedRWPair",
"BufferedRandom", "TextIOBase", "TextIOWrapper",
"UnsupportedOperation", "SEEK_SET", "SEEK_CUR", "SEEK_END"]
import _io
import abc
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
open, FileIO, BytesIO, StringIO, BufferedReader,
BufferedWriter, BufferedRWPair, BufferedRandom,
IncrementalNewlineDecoder, TextIOWrapper)
OpenWrapper = _io.open # for compatibility with _pyio
# Pretend this exception was created here.
UnsupportedOperation.__module__ = "io"
# for seek()
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
# Declaring ABCs in C is tricky so we do it here.
# Method descriptions and default implementations are inherited from the C
# version however.
class IOBase(_io._IOBase, metaclass=abc.ABCMeta):
__doc__ = _io._IOBase.__doc__
class RawIOBase(_io._RawIOBase, IOBase):
__doc__ = _io._RawIOBase.__doc__
class BufferedIOBase(_io._BufferedIOBase, IOBase):
__doc__ = _io._BufferedIOBase.__doc__
class TextIOBase(_io._TextIOBase, IOBase):
__doc__ = _io._TextIOBase.__doc__
RawIOBase.register(FileIO)
for klass in (BytesIO, BufferedReader, BufferedWriter, BufferedRandom,
BufferedRWPair):
BufferedIOBase.register(klass)
for klass in (StringIO, TextIOWrapper):
TextIOBase.register(klass)
del klass
try:
from _io import _WindowsConsoleIO
except ImportError:
pass
else:
RawIOBase.register(_WindowsConsoleIO)
@
Mekire came across that. I am 100% sure there's no other file named 'io.py' in my Lib. If there was indeed a conflict, an uninstall and then again install in different directory at least should have allowed me to run Python IDLE from Windows cmd. But error still persists even if I do a fresh install in different directories.
(Aug-22-2018, 12:37 PM)buran Wrote: (Aug-22-2018, 12:48 AM)FatalPythonError Wrote: error initially did occur when I tried to run a script through VS terminal
what was the name and exact location of this script?
script was named
results.py
and was located in
T:
of my computer.