17

So my pc just decided it doesn't want to run one of my python files no matter what it contains. No errors or anything, just quits as soon as I start it.
WHAT THE FUCK IS GOING ON IT WON'T RUN EVEN IF IT'S EMPTY AND ONLY CONTAINS A PRINT, WHILE THE OTHER FILE WORKS

Edit: I created a new file and pasted the contents and it runs WHAT THE FUCK

Comments
  • 6
    If this was Linux I'd check if the file had execute rights and what user owned that file. On Windows... I'd start by installing Linux.
  • 2
    @Ratwerks It was a python program, not an executable. I run linux on my laptop and I've got it on my desktop as well, but grub died and I had too many driver issues, and I'm learning C# so I just stick with windows on it
  • 1
    @DirtyBit don't worry, you'll experience exactly these situations with visual studio/c# as well. Had these twice in exams :D
  • 3
    All of that struggle for this
  • 4
    I'd guess it was a problem with the file encoding: UTF-8 with or without BOM. Happened sometimes with Visual Studio too.

    If the code is the exact same in both, but only one works, try to compare the encodings, especially compare the first byte with a hex editor.
  • 2
    dos2unix or some encoding shit I've seen that before
Add Comment