Atom stopped working


I meant the whole config.cson file, unaltered. You can use a site like Hastebin to copy and paste it. However, I might have the answer. Based on the lines you shared with me, you need a colon in between your key and your value:

python: "/usr/local/bin/python3"


Thank you! That might very well be the solution to the python 3 issue, however my main issue still remains. I cant do anything in atom, this is what it looks like when I open it. 53


Have you fixed config.cson? Have you made sure that every line is valid CSON? Before we can move on and try other things, you need to verify for me that you’re not opening Atom with an invalid configuration file. Because that’s what it sounds like. The problem started when you changed the config file, and chances are good that it will be fixed when the program can read its own configuration.


No, I can’t find my config.cson file. I have been looking in /usr in Finder but I don’t find anything.


It’s at ~/.atom/config.cson. If you have dotfiles hidden, that could be why you can’t see it.


I have made all files in finder visible but I still can’t find it. When I type “.cson” in finder search I get no search results.

I have also been trying to find the Atom folder where you say the cson-file is stored. According to this link the default location for this folder is /usr/local/bin/ but mine is not there. Atom config directory locations?


The default directory is always in your user folder. Open the Terminal and type cd ~/.atom and you’ll get there.


You were right, it was in my user folder. This is what my cson-file looks like


Look at the final line:

    python: "/usr/local/bin/python3”

See how the last quote is different? Normal quotes all point the same way, and code editors don’t do the thing that forum software and rich-text editors do of converting normal quotes to smart quotes, so you most likely introduced it through copying some code from this forum that wasn’t properly formatted. If you fix that line, Atom should run.

    python: "/usr/local/bin/python3"


Yea, that’s it! Thank you so much for all the help!


Unfortunately I still can’t import python, I get this error


And is there supposed to be a module called pygame? Does the program work when run directly in the terminal? Is it using the correct version of Python (that also has pygame installed)?


Yes I think so. The code works when I run it in IDLE. I have installed python 3 with pip


Do you have any other versions of Python on your computer? When you open Terminal and type python --version, what do you see?


Yes I also have python 2.7. When I type in python --version I see Python 2.7.10


What happens when you run this?

import sys


2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]


Use this shebang; solves all yo’ problems (assuming Python 3 is correctly installed)

#!/usr/bin/env python3


Then the config.cson setting that originally broke Atom isn’t doing anything, if you’re still getting Python 2 when you use atom-runner.


Thank you so much for all the help! The shebang #!/usr/bin/env python3 solved it for me. Still a bit strange that my line in the config file didn’t change the preferred python version to python 3 though.