fix the decode error bug if the job params has no-ascii word#22
Open
CheungChan wants to merge 1 commit intofengsp:masterfrom
Open
fix the decode error bug if the job params has no-ascii word#22CheungChan wants to merge 1 commit intofengsp:masterfrom
CheungChan wants to merge 1 commit intofengsp:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)