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
LC_ALL="en_US.UTF-8"on top of my crontab list. This is kind of hack, in other environment it works without this.PATHvariable issues like this as well. Ideally in crontab file there should be nothing but jobs. So something at OS level must had to be rebuilt or reinstalled to make the fix proper