Manzana-Apple-Music-Downloader
Manzana-Apple-Music-Downloader copied to clipboard
"SyntaxError: Non-ASCII character"
Hello,
What is the reason for this error and how can I solve it?
root@serve:/home/Manzana-Apple-Music-Downloader# python manzana.py https://music.apple.com/lk/music-video/taki-taki-feat-selena-gomez-ozuna-cardi-b/1438473545
File "manzana.py", line 21
SyntaxError: Non-ASCII character '\xe2' in file manzana.py on line 22, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
root@serve:/home/Manzana-Apple-Music-Downloader#
on Debian 10 server.
Thank you!
@emresaracoglu Try adding # -*- coding: utf-8 -*-
to top of the first line in manzana.py
.
I'm getting the same error message, I wrote the following:
python # -- coding: utf-8 -- manzana.py https://music.apple.com/lk/music-video/taki-taki-feat-selena-gomez-ozuna-cardi-b/1438473545
Is this correct?
Also, I'm doing this on a Mac. is Mac compatible via Terminal?
@toughguystudios I never used this program before, but I wrote a lot of python scripts. You will need to open the manzana.py script with a text editor (TEXT, not word, not textedit, use Visual Code for example) and add the line to the TOP of the manzana.py file. So inside it. UTF-8 is needed to process characters that are non-ASCII, like accents for example.
@dropcreations Thank you for your help.
I didn't understand, what verbatim needs to be added to the top line of the file?