Sometimes when you download add-ons from the internet the files are saved as HTML code and not as text files, so Blender has no way to interpret them.
The error might be caused by using the save otpion from the browser and not using the link on the page that triggers the download of the correct file.
To make sure your Python scripts are in the right format you can open them in a text editor, which preferably supports python syntax highlighting.
It should look like:
And not like this:
Another common error is when the addon is contained in a .zip file instead of on a single .py file. If you unzip (or decompress) the file, you are left with a folder that contains many more files that are not easy to install manually. In such cases install directly from the .zip file instead of decompressing.