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

Hello,询问下你使用的python和pyexecjs版本,在我电脑上示例程序会报错 #1

Open
Damon-z3 opened this issue Dec 30, 2023 · 2 comments

Comments

@Damon-z3
Copy link

Traceback (most recent call last):
File "c:\Users\xxx\OneDrive\文档\Promgram\iiiLabCrawler-main\demo.py", line 6, in
res_bili=get_resource(url_bili,BILIBILI)
File "c:\Users\xxx\OneDrive\文档\Promgram\iiiLabCrawler-main\iiilab.py", line 16, in get_resource
enc_link=tool_js.eval(f"getEncLink('{url}')")
File "D:\learn\Programing\Env_PY\spider_py39\lib\site-packages\execjs_abstract_runtime_context.py", line 27, in eval
return self.eval(source)
File "D:\learn\Programing\Env_PY\spider_py39\lib\site-packages\execjs_external_runtime.py", line 73, in eval
return self.exec
(code)
File "D:\learn\Programing\Env_PY\spider_py39\lib\site-packages\execjs_abstract_runtime_context.py", line 18, in exec

return self.exec(source)
File "D:\learn\Programing\Env_PY\spider_py39\lib\site-packages\execjs_external_runtime.py", line 83, in exec
return self._extract_result(output)
File "D:\learn\Programing\Env_PY\spider_py39\lib\site-packages\execjs_external_runtime.py", line 163, in _extract_result
raise exceptions.RuntimeError(value)
execjs._exceptions.RuntimeError: SyntaxError: 语法错误

@Damon-z3
Copy link
Author

好吧,我找到错误了,pyexecjs版本使用1.4.1版本就能正确输出了,对应的python版本为3.9.13,感谢老哥分享

@1kuzus
Copy link
Owner

1kuzus commented Dec 30, 2023

ok 解决了就好~
我的python版本是3.10.4,pyexecjs版本是1.5.1

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

No branches or pull requests

2 participants