我正在尝试使用本教程开始开发Firefox附加组件,但出现以下问题
(c:\addon-sdk-1.15) C:\Users\Khaled\my-addon>cfx run
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\khaled\appdata\local\temp\tmph_o0ca.mozrunner'.
Traceback (most recent call last):
File "c:\addon-sdk-1.15\bin\cfx", line 33, in <module>
cuddlefish.run()
File "c:\addon-sdk-1.15\python-lib\cuddlefish\__init__.py", line 945, in run
pkgdir=options.pkgdir)
File "c:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 705, in run_app
runner.start()
File "c:\addon-sdk-1.15\python-lib\mozrunner\__init__.py", line 532, in start
self.process_handler = run_command(self.command+self.cmdargs, self.env, **se
lf.kp_kwargs)
File "c:\addon-sdk-1.15\python-lib\mozrunner\__init__.py", line 59, in run_com
mand
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:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 533, 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:\\users\\khaled\\appdata\\local\\temp\\harness-stdou
t-j8zqpd'
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:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 533, 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:\\users\\khaled\\appdata\\local\\temp\\harness-stdou
t-j8zqpd'
我正在使用python 2.6.6,并尝试了2.7.6,出现了相同的问题...有什么建议吗?
搜索后,我发现问题是:与python 2.7.6不兼容的附加SDK,因此您必须使用python 2.6.6并在使用python 2.6.6时处理此错误
(c:\addon-sdk-1.15) C:\Users\Khaled\my-addon>cfx run
Traceback (most recent call last):
File "c:\addon-sdk-1.15\bin\cfx", line 33, in <module>
cuddlefish.run()
File "c:\addon-sdk-1.15\python-lib\cuddlefish\__init__.py", line 945, in run
pkgdir=options.pkgdir)
File "c:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 639, 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 "C:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "c:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 533, 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:\\users\\khaled\\appdata\\local\\temp\\harness-stdou
t-ecam39'
Error in sys.exitfunc:
Traceback (most recent call last):
File "C:\Python26\lib\atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "c:\addon-sdk-1.15\python-lib\cuddlefish\runner.py", line 533, 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:\\users\\khaled\\appdata\\local\\temp\\harness-stdou
t-ecam39'
解决方案:
1-下载cp720
2-解压缩zip文件。
3-将文件cp720.py复制或移动到python编码文件夹中。
Example: C:\Python26\Lib\encodings\
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句