PyExecJs error resolved

Traceback (most recent call last):
  File "D:/python-file/algorithm/spider_air.py", line 22, in <module>
    params = ctx.eval(js)
  File "C:\Users\Since\AppData\Local\Programs\Python\Python36\lib\site-packages\execjs\_abstract_runtime_context.py", line 28, in eval
    return self._eval(source)
  File "C:\Users\Since\AppData\Local\Programs\Python\Python36\lib\site-packages\execjs\_external_runtime.py", line 76, in _eval
    return self.exec_(code)
  File "C:\Users\Since\AppData\Local\Programs\Python\Python36\lib\site-packages\execjs\_abstract_runtime_context.py", line 19, in exec_
    return self._exec_(source)
  File "C:\Users\Since\AppData\Local\Programs\Python\Python36\lib\site-packages\execjs\_external_runtime.py", line 88, in _exec_
    return self._extract_result(output)
  File "C:\Users\Since\AppData\Local\Programs\Python\Python36\lib\site-packages\execjs\_external_runtime.py", line 169, in _extract_result
    raise exceptions.RuntimeError(value)
execjs._exceptions.RuntimeError: SyntaxError: 语法错误
Error from: execjs is js code-driven system comes with Jscript to be executed, if for no other reason or report syntax errors. 

Solution: 
Import execjs 
Import OS 
# os.environ [ " EXECJS_RUNTIME " ] = ' PhantomJS ' 
Node = execjs. GET () 

the drive becomes: Phantomjs to

The perfect solution! ! !

Guess you like

Origin www.cnblogs.com/liuer-mihou/p/11261526.html