0

i got a script by name students.py the code is this

import time
import keyboard as kb
import random
import numpy as np
while True:
    Students = ["Nishesh","Anshika","Naincy","Geeta","Rajneesh"]
    exitcon = ["close","exit","Quit","quit","Exit","Close"]
    maxrn = len(Students)
    Marks = [100,2,100,100,100]
    uinnput = input("Enter Roll no of students : ")
    if uinnput in exitcon:
        break
    if uinnput.isdigit():
        if uinnput > "0" and uinnput < "6":
            rn = int(uinnput) - 1
            print(Students[rn]," : " , Marks[rn])
        else:
            print("Please enter a number between 1 and ",maxrn)
    else:
        print("Please enter a number between 1 and ",maxrn)

its a pretty simple script and I converted it to exe but with pyinstallerand when i run the exe it gives this error

Traceback (most recent call last):   File "students.py", line 10, in <module> RuntimeError: input(): lost sys.stdin 

it works fine in when running the python file with cmd but this exe isn't

  • Is this your answer https://stackoverflow.com/questions/23418949/pygame-attributeerror-module-object-has-no-attribute-copy – Mehmaam Oct 21 '22 at 11:49
  • but after deleting copy file it still didnt work even though its working in cmd it gives this error ```Traceback (most recent call last): File "students.py", line 10, in RuntimeError: input(): lost sys.stdin ``` – Nishesh Tyagi Oct 21 '22 at 11:54
  • @NisheshTyagi please update your question with the new error message and please explain if `student.py` is the name of your script file – Alexander Oct 21 '22 at 22:04

0 Answers0