My python script run fine when ran manually but whenever run from cron job it throws
UnicodeEncodeError: 'ascii' codec can't encode character '\u2122' in position 0: ordinal not in range(128)
myfile.py:
print(u"\u2122")
I am on macos high sierra and python version is 3.6.0
Fixed it by putting on top of crontab:
LC_ALL="en_US.UTF-8"