4

我决定学习使用附加 SDK 开发 Firefox 附加组件,并且我正在学习 Mozilla 网站上的教程。当我开始运行时,cfx run我得到了以下异常(到底是什么)

注意: Firefox 版本 23.0、附加 SDK 1.14、Python 2.6.6、操作系统 Windows XP SP3

(D:\addon-sdk-1.14) D:\my_addon>cfx run
Traceback (most recent call last):
  File "D:\addon-sdk-1.14\bin\cfx", line 33, in <module>
    cuddlefish.run()
  File "D:\addon-sdk-1.14\python-lib\cuddlefish\__init__.py", line 928, in run
    bundle_sdk=options.bundle_sdk)
  File "D:\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 640, in run_app

    print >>sys.stderr, "Using binary at '%s'." % runner.binary
LookupError: unknown encoding: cp720
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "D:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "D:\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 534, in maybe_r
emove_outfile
    os.remove(outfile)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\docume~1\\ab\\locals~1\\temp\\harness-stdout-p7spr
q'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "D:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "D:\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 534, in maybe_r
emove_outfile
    os.remove(outfile)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\docume~1\\ab\\locals~1\\temp\\harness-stdout-p7spr
q'
4

2 回答 2

5

这是一个python(2.6)错误

尝试建议的解决方法或升级到 2.7

于 2013-09-21T23:10:40.530 回答
1

只是想提一下,使用 Python 2.7 可能不适用于某些人。Add-On SDK 的README文件指出“在继续之前,请确保您已经安装了 Python 2.5、2.6 或 2.7”,因此我最初安装了 Python 2.7.6。(请注意,这是 Add-On SDK 的 1.15 版。)进入后cfx run,我收到了类似(尽管不相同)的错误消息(可以在我的错误报告中找到)。降级到 Python 2.6.6 后,我不再收到该错误。事实上,附加 SDK的故障排除页面指出cfx currently expects Python 2.5 or 2.6. Older and newer versions may or may not work.

于 2014-01-10T18:33:16.610 回答