Crontab-Python3 Error: UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0–3: ordinal not in range(128)

项月亮
1 min readMar 20, 2019

--

Crontab wrongly use ASCII rather than UTF-8 coding Chinese string. To solve this problem:

crontab -e

then prepend a LANG directive to the script command.

LANG=zh_CN.UTF-8

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response