+ 3
What is EOF error..? And how to debug it..?
5 Antworten
+ 3
https://www.sololearn.com/discuss/2615286/?ref=app
https://www.sololearn.com/discuss/1165440/?ref=app
https://www.sololearn.com/discuss/487219/?ref=app
https://www.sololearn.com/discuss/2344854/?ref=app
https://www.sololearn.com/discuss/3024069/?ref=app
https://www.sololearn.com/discuss/2994531/?ref=app
https://www.sololearn.com/discuss/1165439/?ref=app
https://www.sololearn.com/discuss/1826068/?ref=app
+ 4
In Python, an EOFError is an exception that gets raised when functions such as input() and raw_input() return end-of-file (EOF) without reading any input.
Steps to Avoid EOF Error in Python
If EOF Error happens without reading any data using the input() function, an EOF Error exception will be raised. In order to avoid this exception being raised,
Before sending the Eof exception, try to input something like CTRL + Z or CTRL + D or an empty string which the below example can demonstrate:
try:
data = raw_input ("Do you want to continue?: ")
except EOFError:
print ("Error: No input or End Of File is reached!")
data = ""
print data
hope this anwer is helpful for you 😊
+ 3
Mihir Lalwani ,
best way would be to post a link to your code here
0
End of File. This can be googled much easier than posting here. If you need help debugging, you should be posting your code as well.
- 5
Idn