How to solve this error "UnsupportedOperation: fileno"

24 Views Asked by At

I am trying to import Vit file in colab but i am getting an error. How to solve the error?

import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"

import numpy as np
import cv2
from glob import glob
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
from patchify import patchify
import tensorflow as tf
import ptyprocess
from tensorflow.keras.callbacks import ModelCheckpoint, CSVLogger, ReduceLROnPlateau, EarlyStopping
from vit import ViT */error in this line*/

Error:
UnsupportedOperation Traceback (most recent call last)
<ipython-input-16-39f3b830a59a> in <cell line: 13>()
     11 import ptyprocess
     12 from tensorflow.keras.callbacks import ModelCheckpoint, CSVLogger, ReduceLROnPlateau, EarlyStopping
---> 13 from vit import ViT

3 frames
/usr/local/lib/python3.10/dist-packages/vit/util.py in <module>
      6 from urwid.util import calc_width
      7 
----> 8 curses.setupterm()
      9 e3_seq = curses.tigetstr('E3') or b''
     10 clear_screen_seq = curses.tigetstr('clear') or b''

UnsupportedOperation: fileno 

How can i solve this error in my colab system. I have tried an work around but that didn't work out either. I need to import the ViT package from vit library.

0

There are 0 best solutions below