报错内容如下:
Traceback (most recent call last):
File "E:/projects/DailyWork/weblook/web_test1.py", line 5, in
infos_return, session = lg.zhihu('18571087911', 'kexin5438', 'pc')
File "E:\projects\DailyWork\venv\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 542, in login
data = js.call('encrypt', urlencode(data))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 93, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec(code)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtimecontext.py", line 18, in exec
return self.exec(source)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 89, in exec
return self._extract_result(output)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 169, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: 缺少标识符
应该是在popen调用cscript.exe的时候报错的
源码是这样的:
p = Popen(cmd, stdout=PIPE, stderr=PIPE, cwd=self._cwd, universal_newlines=True)
stdoutdata, stderrdata = p.communicate()
ret = p.wait()
报错内容如下: Traceback (most recent call last): File "E:/projects/DailyWork/weblook/web_test1.py", line 5, in
infos_return, session = lg.zhihu('18571087911', 'kexin5438', 'pc')
File "E:\projects\DailyWork\venv\lib\site-packages\DecryptLogin\platforms\zhihu.py", line 542, in login
data = js.call('encrypt', urlencode(data))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 93, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec(code)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_abstract_runtimecontext.py", line 18, in exec
return self.exec(source)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 89, in exec
return self._extract_result(output)
File "E:\projects\DailyWork\venv\lib\site-packages\execjs_external_runtime.py", line 169, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: 缺少标识符
应该是在popen调用cscript.exe的时候报错的 源码是这样的: p = Popen(cmd, stdout=PIPE, stderr=PIPE, cwd=self._cwd, universal_newlines=True) stdoutdata, stderrdata = p.communicate() ret = p.wait()
cmd打印出来是: ['C:\Windows\system32\cscript.EXE', '//E:jscript', '//Nologo', 'C:\Users\kexin\AppData\Local\Temp\execjs5x6h8ayz.js']
请问这个问题怎么解决,谢谢