我尝试启动:cfx run
但我收到了以下错误:
(C:\Users\michal smoczyk\Downloads\addon-sdk-1.14) C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\my-addon>cfx run
Using binary at 'C:\Program Files\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\michal~1\appdata\local\temp\tmpkcrwv7.mozrunner'.
Traceback (most recent call last):
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\bin\cfx", line 33, in <module>
cuddlefish.run()
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\cuddlefish\__init__.py", line 928, in run
bundle_sdk=options.bundle_sdk)
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 706, in run_app
runner.start()
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\mozrunner\__init__.py", line 529, in start
self.process_handler = run_command(self.command+self.cmdargs, self.env, **self.kp_kwargs)
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\mozrunner\__init__.py", line 59, in run_command
return killableprocess.Popen(cmd, env=env, **killable_kwargs)
File "C:\Python27\lib\subprocess.py", line 709, in __init__
errread, errwrite)
TypeError: _execute_child() takes exactly 17 arguments (18 given)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 534, in maybe_remove_outfile
os.remove(outfile)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\michal~1\\appdata\\local\\temp\\harness-stdout-l8remz'
Error in sys.exitfunc:
Traceback (most recent call last):
File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "C:\Users\michal smoczyk\Downloads\addon-sdk-1.14\python-lib\cuddlefish\runner.py", line 534, in maybe_remove_outfile
os.remove(outfile)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\michal~1\\appdata\\local\\temp\\harness-stdout-l8remz'
我的Firefox版本:26。我安装了Python 2.7。操作系统:Windows Vista,SDK:1.14
答案 0 :(得分:7)
当前的1.15版Add-on SDK似乎不适用于Python 2.7.6。
我收到了同样的错误,并降级为Python 2.7.5以解决此问题。
以下是一些相关的错误报告:
Bug 950894 - [mozprocess] TypeError under windows evironment in cpython 2.7.6
Bug 958609 - Add-on SDK 1.15 incompatible with Python 2.7.6
答案 1 :(得分:3)
我建议从Mozilla Developer Hub :: Add-ons for Firefox网页获取最新版本的SDK(addon-sdk-1.15.zip
)。另外,请务必阅读其随附的README文件中的说明(如果您还没有)。
它说的一个相关的事情是:
如果在运行cfx时遇到错误或有任何其他问题 入门,请参阅“疑难解答”指南: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/troubleshooting.html
答案 2 :(得分:0)
尝试使用python 2.6.6安装附加sdk 1.15然后执行此步骤
1-下载cp720
2-解压缩zip文件。
3-将文件cp720.py复制或移动到python编码文件夹中。
Example: C:\Python26\Lib\encodings\