"The application “%@” can’t be opened." However doing "open with" and selecting default app works

Using macOS Sierra, when I double click a file that is supposed to open with Atom I get this message:

enter image description here

However if I right click and choose the default option it works fine:

enter image description here


Fixed by uninstalling atom (using appCleaner) and then reinstalling most recent version.