Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the decode error bug if the job params has no-ascii word #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CheungChan
Copy link

File "/Users/chenzhang/PycharmProjects/threatbook_spider/visual_spider_web/views/slave_views.py", line 74, in make_cron_tasks
cron.run('update')
File "/Users/chenzhang/envs/threatbook_spider/lib/python3.6/site-packages/plan/core.py", line 278, in run
self.update_crontab(run_type)
File "/Users/chenzhang/envs/threatbook_spider/lib/python3.6/site-packages/plan/core.py", line 221, in update_crontab
current_crontab = self.read_crontab()
File "/Users/chenzhang/envs/threatbook_spider/lib/python3.6/site-packages/plan/core.py", line 202, in read_crontab
r = communicate_process(command, universal_newlines=True)
File "/Users/chenzhang/envs/threatbook_spider/lib/python3.6/site-packages/plan/utils.py", line 22, in communicate_process
output, error = p.communicate(stdin)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 843, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1554, in _communicate
self.stdout.errors)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 740, in _translate_newlines
data = data.decode(encoding, errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 60898: ordinal not in range(128)

@CheungChan CheungChan changed the title fix the decode error bug if the job params has not ascii word fix the decode error bug if the job params has no-ascii word Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant