Run a business script locally today, perfect!
Then deploy the script to the server to run, perfect!
Add to crontab timing task, report error!
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 57-60: ordinal not in range(128)
Then all kinds of methods are checked, according to the blogger’s method can not solve
after a toss, there’s no choice but to use a stupid method. Add the running script to a shell script and add the following two lines of code in front of it. It’s normal! It’s a solution anyway
export LANG="en_US.UTF-8"
export PYTHONIOENCODING=utf-8
Read More:
- Unicode encodeerror: ‘GBK’ codec can’t encode character solution
- Python SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3:
- python SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: trunca
- When reading the CSV file with Python 3, the Unicode decodeerror: ‘UTF-8’ codec can’t decode byte 0xd0 in position 0: invalid con appears
- Encountered a problem — Python — Python 3 uses Sqlalchemy to report an error‘
- Pyinstall (Unicode error) ‘Unicode scape’ error handling
- Solve Python error Unicode error ‘UTF-8’
- Unicode decodeerror: ‘UTF-8’ codec can’t decode byte 0xd3 in position 238: invalid continuation B
- Successfully resolved Unicode decodeerror: ‘UTF-8’ codec can’t decode byte 0xd3 in position 238: invalid continuation B
- SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX
- SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: truncated \UX
- BarTender operation encountered the problem of “OLE DB encountered error 0x80004005”
- Syntax Error: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position resolution
- Unicode decodeerror: ‘UTF-8’ codec can’t decode byte 0x80 in position 3131: invalid start byte solution
- Solution of Unicode decodeerror -‘utf-8 ‘codec can’t decode byte 0xc4 in position 0 – invalid continuation byte
- How to solve the problem of syntax error: (Unicode error)’unicodescape ‘codec can’t decode bytes in position 2-3: truncat
- Error encountered while executing PIP install: error: complete output from command Python setup.py egg_ info:
- Summary of problems encountered in using OpenGL in QT
- Problems encountered in configuring OpenGL development environment in vs2015
- Error: undefined reference to ‘CV:: xxx’ encountered in using OpenCV in QT