以下列方式使用python-spidermonkey(guide之后)给出错误AttributeError: 'spidermonkey.Context' object has not attribute 'eval_script'
。
>>> import spidermonkey
>>> rt = spidermonkey.Runtime()
>>> cx = rt.new_context()
>>> cx.eval_script("1 + 2") + 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'spidermonkey.Context' object has no attribute 'eval_script'
答案 0 :(得分:2)
我遇到了同样的问题,我也发现了这个错误报告: https://launchpad.net/~pi-rho/+archive/security/+build/3866138
在Ubuntu(12.10)上安装此软件包对我有用: https://launchpad.net/~pi-rho/+archive/security/+build/3866138