Pregunta

I'm trying to start developing Firefox add-on using this tutorial but the following problem appears

(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'

I'm using python 2.6.6 and tryed 2.7.6 the same problem appears ... any suggestion??

¿Fue útil?

Solución

After Searching I found that the problem is : add-on SDK in incompatible with python 2.7.6 so that you have to use python 2.6.6 and to handle this error while using 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' 

The Solution:

1- Download cp720

2- unzip the zip file.

3- Copy or Move the file cp720.py into your python encodings folder.

 Example: C:\Python26\Lib\encodings\

Otros consejos

Well your windows machine is saying that the files generated by cfx run are being used by another process, so I would guess that you have a virus scanner or some other program that is using the file immediately after it is created.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top