报错信息
Traceback (most recent call last):
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 211, in
zhihu.single_answer(id)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 127, in single_answer
question_title = self.get_question_title(question_id)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 120, in get_question_title
response = self.proxy_pool.get(url, headers=self.get_headers(url), anonymity=False)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 42, in get_headers
encryptstr = "2.0%s" % ctx1.call('b', fmd5)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 92, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 78, in eval
return self.exec(code)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_abstract_runtimecontext.py", line 18, in exec
return self.exec(source)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 85, in exec
output = self._exec_with_tempfile(source)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 127, in _exec_with_tempfile
self._fail_on_non_zero_status(ret, stdoutdata, stderrdata)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 134, in _fail_on_non_zero_status
raise ProcessExitedWithNonZeroStatus(status=status, stdout=stdoutdata, stderr=stderrdata)
execjs._exceptions.ProcessExitedWithNonZeroStatus: (101, '', 'Warning: The jjs tool is planned to be removed from a future JDK release\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:1:61 Expected an operand but found const\n(function(program, execJS) { execJS(program) })(function() { const jsdom = require("jsdom");\n ^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:2:0 Expected an operand but found const\nconst {JSDOM} = jsdom;\n^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:2:14 Expected an operand but found =\nconst {JSDOM} = jsdom;\n ^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:3:0 Expected an operand but found const\nconst dom = new JSDOM(<!DOCTYPE html><p>Hello world</p>);\n^\n')
具体项目 【e.g. 知乎用户爬虫】
bug描述 运行时 报错,但是不清楚哪里有点小问题 bug复现步骤
报错信息 Traceback (most recent call last): File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 211, in
zhihu.single_answer(id)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 127, in single_answer
question_title = self.get_question_title(question_id)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 120, in get_question_title
response = self.proxy_pool.get(url, headers=self.get_headers(url), anonymity=False)
File "/Users/youzeliang/dev/code/python/spider_collection/zhihuAnswerSpider/spider/zhihu_answer.py", line 42, in get_headers
encryptstr = "2.0%s" % ctx1.call('b', fmd5)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 92, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 78, in eval
return self.exec(code)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_abstract_runtimecontext.py", line 18, in exec
return self.exec(source)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 85, in exec
output = self._exec_with_tempfile(source)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 127, in _exec_with_tempfile
self._fail_on_non_zero_status(ret, stdoutdata, stderrdata)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/execjs/_external_runtime.py", line 134, in _fail_on_non_zero_status
raise ProcessExitedWithNonZeroStatus(status=status, stdout=stdoutdata, stderr=stderrdata)
execjs._exceptions.ProcessExitedWithNonZeroStatus: (101, '', 'Warning: The jjs tool is planned to be removed from a future JDK release\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:1:61 Expected an operand but found const\n(function(program, execJS) { execJS(program) })(function() { const jsdom = require("jsdom");\n ^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:2:0 Expected an operand but found const\nconst {JSDOM} = jsdom;\n^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:2:14 Expected an operand but found =\nconst {JSDOM} = jsdom;\n ^\n/var/folders/m1/_lgr3wp914ddstxf6n0pl4qr0000gn/T/execjsuao8gzow.js:3:0 Expected an operand but found const\nconst dom = new JSDOM(
<!DOCTYPE html><p>Hello world</p>
);\n^\n')系统环境
其他 其余相关描述或内容