Python can';t使用cfx run运行我开发的firefox插件

Python can';t使用cfx run运行我开发的firefox插件,python,firefox,firefox-addon,firefox-addon-sdk,Python,Firefox,Firefox Addon,Firefox Addon Sdk,我正试图用它来开发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 recen

我正试图用它来开发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'
(c:\addon-sdk-1.15)c:\Users\Khaled\my addon>cfx run
在“C:\ProgramFiles(x86)\Mozilla Firefox\Firefox.exe”中使用二进制文件。
在“c:\users\khaled\appdata\local\temp\tmph\u o0ca.mozrunner”中使用配置文件。
回溯(最近一次呼叫最后一次):
文件“c:\addon-sdk-1.15\bin\cfx”,第33行,在
cuddlefish.run()
文件“c:\addon-sdk-1.15\python lib\cuddlefish\\uuuu init\uuuu.py”,第945行,正在运行
pkgdir=options.pkgdir)
运行应用程序中的文件“c:\addon-sdk-1.15\python lib\cuddlefish\runner.py”,第705行
runner.start()
文件“c:\addon-sdk-1.15\python lib\mozrunner\\uuuu init\uuuu.py”,第532行,在开始处
self.process\u handler=run\u命令(self.command+self.cmdargs,self.env,**se
lf.kp_kwargs)
文件“c:\addon-sdk-1.15\python lib\mozrunner\\uu init\uu.py”,第59行,在run\u com中
曼德
返回killableprocess.Popen(cmd,env=env,**killableprocess)
文件“C:\Python27\lib\subprocess.py”,第709行,在\uuu init中__
错误读取,错误写入)
TypeError:_execute_child()正好接受17个参数(给定18个)
atexit中出错。\u运行\u退出功能:
回溯(最近一次呼叫最后一次):
文件“C:\Python27\lib\atexit.py”,第24行,在运行函数中
func(*targs,**kargs)
文件“c:\addon-sdk-1.15\python lib\cuddlefish\runner.py”,第533行
emove_输出文件
删除操作系统(输出文件)
WindowsError:[错误32]进程无法访问该文件,因为它正在被删除
由另一个进程使用:“c:\\users\\khaled\\appdata\\local\\temp\\harness stdou”
t-j8zqpd'
sys.exitfunc中的错误:
回溯(最近一次呼叫最后一次):
文件“C:\Python27\lib\atexit.py”,第24行,在运行函数中
func(*targs,**kargs)
文件“c:\addon-sdk-1.15\python lib\cuddlefish\runner.py”,第533行
emove_输出文件
删除操作系统(输出文件)
WindowsError:[错误32]进程无法访问该文件,因为它正在被删除
由另一个进程使用:“c:\\users\\khaled\\appdata\\local\\temp\\harness stdou”
t-j8zqpd'

我正在使用Python2.6.6和tryed 2.7.6,同样的问题出现了。。。有什么建议吗???

您的windows计算机表示,
cfx run生成的文件正在被另一个进程使用,因此,我猜您有一个病毒扫描程序或其他一些程序在文件创建后立即使用该文件。

搜索后,我发现问题是:附加SDK与python 2.7.6不兼容,因此您必须使用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' 

我不知道SDK的编译,但是已经过了几个小时了,你还没有回复吗?你想试试我的引导插件吗?意思是没有sdk?我使用此方法主要是调试我的加载项,因此如果您的方法可以轻松调试,您可以告诉我您的方法:)哦,调试是一样的,您只需使用浏览器控制台它非常简单不?我已停止所有运行的程序,如firefox、防病毒、防火墙,并且出现相同的错误:(
 Example: C:\Python26\Lib\encodings\