---
title: "Discussion on \"Why input() fails in online compilers (EOFError) and how to fix it\" | Hashnode"
description: "Discussion on \"Why input() fails in online compilers (EOFError) and how to fix it\". You write name = input() and print(\"hi\", name), press Run, and get EOFError: EOF when reading a line. Your Python syntax is fine. The problem is that your program asked for a line of input, and there"
url: "https://hashnode.com/posts/why-input-fails-in-online-compilers-eoferror-and-how-to-fix-it/6b09911854bf6c732b7fdc1f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why input() fails in online compilers (EOFError) and how to fix it](https://anki1kr.hashnode.dev/why-input-fails-in-online-compilers-eoferror-and-how-to-fix-it?utm_source=hashnode&utm_medium=feed)

You write name = input() and print("hi", name), press Run, and get EOFError: EOF when reading a line. Your Python syntax is fine. The problem is that your program asked for a line of input, and there

6d ago · 6 min read · anki1kr.hashnode.dev  
Read the article

## Written by

[Ankit Kumar](https://hashnode.com/@anki1kr)

@anki1kr

  
[View profile](https://hashnode.com/@anki1kr)

BCA student building DSA Tracker, a free place to learn, practise and revise DSA

I build DSA Tracker (dsatracker.tech): 370 curated problems from Striver A2Z, Love Babbar 450 and Apna College, reordered for 30 job roles, with an in-browser compiler, a judge, mock interviews and aptitude practice. Everything runs on free tiers. I write about what breaks and what I learn fixing it.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
