Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Brice Roberts22,415 Points
For anyone getting EOF errors when trying to use PyCharm
In your menu bar
Select Run>Edit Configurations
Tick the box for Emulate Terminal in Output Console under the Execution header.
ReRun diary.py, and then add your entry. When you are finished, enter CTRL+D and then hit enter. Your application will run as intended.
This will stop PyCharm from sending the incorrect EOF signal to the console.
Adam KielarPython Web Development Techdegree Graduate 13,818 Points
My solution for Mac users.
In menu bar select PyCharm>Preferences>Keymap , search for EOF. Click Add Keyboard Shortcut. I used ⌘I because there is conflict with ⌘D.
After you run diary.py , type your entry, hit ⌘I and after that hit Enter.
Ricky Kresslein6,612 Points
Thank you for the tips guys. Unfortunately neither worked for me. What did work was a slight modification of Brice's tip. Instead of checking the box for Emulate Terminal in Output Console, I checked the box Run with Python Console.
It's a little funky, you need to hold control while pressing Enter to get a new line, but it works. Just press Enter instead of Ctrl + D and you will get the same result.