MacOS – Error while changing the default application with which we open a file

macmacbook promacos

Recently I've tried to change the default application with which a file is opened, by doing the following:

  1. Right click on the file

  2. Get info

  3. In "Open with", change to the application you want your file to be opened with.

  4. Click on the "Change All" button which is found under the "Open with" label

in the last step, i.e. when I click on "Change All", I receive the following message:

enter image description here

then if I look at the default application that opens this file, it's really the application I've just chosen, but when I click on the file to open it, I've the following error message:

enter image description here

Yes, I was trying to open a Makefile for a C program.

Any ideas of why this is happening and how to solve it?

Best Answer

I had the same problem, with a set of files that do have an extension (testfile.py). It turned out that there was an (invisible to me) space at the end of the filename "testfile.py ", which was causing the headache. i removed that, and all was fine again.