Table of Contents
Approved
It is worth reading these troubleshooting ideas if you are getting Windows Error Subprocess Python 6. Your computer has an incorrect error code.
I am currently trying to develop a Python Alexa toolbar in QGIS and run binaries with subprocess:
program = os.path.join (self.tranusConf.tranusBinPath, 'pasos' + self.extension) otherwise os.path.isfile (program): Registration error.
('the program was not counted in% s'% self.tranusBinPath) come back 0 outpasos matches os.path.join (self.resultDirectory, "outpasos.txt") outpasoserr matches os.path.join (self.resultDirectory, "outpasoserr.txt") args corresponds to Self [program, .tranusConf. "Scenario",] result = subprocess.Popen (args, stdout = open (outpasos, "w"), stderr Open (outpasoserr, = 'w'), close_fds equals False, cwd = self.tranusConf.workingDirectory) # Success! 1 deployment An error occurred while executing Python code: WindowsError: [Error 6] Minimum valid traceability handle (most recent calls lasted): File "C: /Users/emna/.qgis2/python/plugins OptionsTRANUS launch_tranus_dialog.py", line 109, back to run_tranus interface.runTranus (tab.spin_box.value ()) File "C: /Users/emna/.qgis2/python/plugins OptionsTRANUS LcalInterface.py", net 426, in runTranus self.runPump () File "C: /Users/emna/.qgis2/python/plugins OptionsTRANUS LcalInterface.py", line 311, from runPasos close result = subprocess.Popen (args, stdout = open (outpasos, "w"), stderr Open (outpasoserr, equals 'w'), close_fds = False, cwd equals self.tranusConf.workingDirectory) # Success! The file "C: OSGEO4 ~ 1 apps Python27 lib subprocess.py ", line 703, __init__ inside errread, errwrite) = self._get_handles (stdin, stdout, stderr) File "C: OSGEO4 ~ 1 apps Python27 lib subprocess.py", line 839, in _get_handles p2cread = self._make_inheritable (p2cread) The file "C: OSGEO4 ~ 1 apps Python27 lib subprocess.py", line 878, is in _make_inheritable _subprocess.DUPLICATE_SAME_ACCESS) WindowsError: [Error 6] Valid neo descriptor
Approved
The ASR Pro repair tool is the solution for a Windows PC that's running slowly, has registry issues, or is infected with malware. This powerful and easy-to-use tool can quickly diagnose and fix your PC, increasing performance, optimizing memory, and improving security in the process. Don't suffer from a sluggish computer any longer - try ASR Pro today!
I've searched for other people who usually have the same error and they suggest calling
shell = True
plusos.popen
, but it doesn't work that way.As far as I remember, I updated the systems
check_output
in the subprocess.py file:if 'stdout' in Kwargs: increase the valueerror argument ("stdout is far from allowed, it will be overwritten.")Opening process (stdout = PIPE, = * popenargs, ** kwargs)
if 'stdout' is the latest Kwargs: increase ValueError ("no stdout argument specified, it will be overwritten").kwargs.pop ("stderr", no)Process is Popen (stdout = PIPE, stderr = PIPE, stdin = PIPE, * popenargs, ** kwargs)
GISBASE = C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2LD_LIBRARY_PATH = C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 libPATH = C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc;C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python;C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 bin;C: Program Files GIS (x86) quant Lisboa apps msys bin;C: Program Files GIS (x86) quant Lisboa apps Python27;PYTHONLIB = C: Program Files GIS (x86) quantum Lisbon applications Python27PYTHONPATH = C: Program Files GIS (x86) quant Lisboa apps grass grass-6.4.3RC2 etc pythonGRASS_SH = C: Program Files (x86) Quantum GIS Lisboa apps msys bin sh.exe
I have created a plugin for qgis, the QGIS WordPress Tool Builder.now would like to transfer the grass.script to this script
# Importing PyQt and QGIS Shared Librariesimport from PyQt4.QtCore *from import PyQt4.QtGui *qgis.core values *# Initialize Qt resources from websites file.pyImporting rc resources# Import code for new dialogimport from testdialog testDialog# Import Bold.scriptimport of OS, SISImport Grass.script as Grass
When I run this script, I encounter the following error:WindowsError: [Error 6] Invalid handle
Failed to load experimental plugin due to an error in the method callTraceback classFactory () (last phone last): File "C: / PROGRA ~ 2 / Quantum GIS Lisboa / apps / qgis /./ python qgis utils.py", Web 164, in startPlugin plugins [packageName] = package.classFactory (iface) File "C: /Users/admin/.qgis//python/plugins test __ init__.py", line 52, in classFactory trialtest Importance of file "C: / PROGRA ~ 2 / Quantum GIS Lisboa / apps / qgis /./ python qgis utils.py", group 309, in _import mod matches _builtin_import (name, globals, locales, list from list, level) File "C: /Users/admin/.qgis//python/plugins test test.py", 31 lines grass.script is passed as grass File "C: / PROGRA ~ 2 / Quantum GIS Lisboa / apps / qgis /./ python qgis utils.py", 309, line in _import mod = _builtin_import (name, globals, locales, source list, level) File "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script __ init__.py", line of a specific person, in at the place of origin of the main import * File "C: / PROGRA ~ 2 / Quantum GIS Lisboa / apps / qgis /./ python qgis utils.py", 309, line in _import mod matches _builtin_import (name, globals, locales, list from list, level) File "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py", line 1201, debug_level = int (gisenv (). get ('DEBUG', 0)) "C: Program file Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py", 558, line in gisenv s = read_command ("g.gisenv", flags = 'n') File "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py", line B 238, read_command ps = pipe_command (* arguments, ** kwargs) File "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py", line 215, in pipe_command return start_command (* args, ** kwargs) The file "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py ", series 177, in start_command Return Popen (args, ** popts) File "C: Program Files (x86) Quantum GIS Lisboa apps grass grass-6.4.3RC2 etc python grass script core.py", 56, zone in __init__ Launch information, creation indicators) File "C: PROGRA ~ 2 Quantum GIS Lisboa apps Python27 lib subprocess.py", 672, line in __init__ errread, errwrite) = self._get_handles (stdin, stdout, stderr) File "C: PROGRA ~ 2 Quantum Lisboa apps Python27 lib subprocess gis.py", line 784, in _get_handles p2cread self = ._ make_inheritable (p2cread) SIG file "c: progra ~ 2 quant Lisboa apps Python27 lib subprocess.Line py", 823, _make_inheritable everywhere _subprocess.DUPLICATE_SAME_ACCESS)WindowsError: [Error 6] Invalid handlePython became version:2.7.2 (Standard, June 12, 2011, [MSC 15:08:59) v.1500 32 bit (Intel)]QGIS version:1.8.0-Lisbon Lisbon, f440b60Python path: GIS ['c: / progra ~ 2 / quantum Lisboa / apps / qgis /./ python', 'C: /Users/admin/.qgis//python', 'C: /Users/admin/.qgis // python / plugins ',' C: / PROGRA ~ 2 / Quantum GIS Lisboa / apps / qgis /./ python / plugins ',' C: Program (x86) Quantum writing GIS Lisboa documents apps grass grass-6.4.3RC2 etc python ',' C: PROGRA ~ 2 Quantum GIS Lisboa bin python27.zip ', GIS' c: progra ~ 2 quant Lisboa apps Python27 DLs', GIS 'c: progra ~ 2 quant Lisboa apps Python27 lib', GIS 'c: progra ~ 2 quant Lisboa apps Python27 lib plat-win', GIS 'c: progra ~ 2 quant Lisboa apps Python27 lib lib-tk ', GIS' c: progra ~ 2 Quantum Lisboa apps qgis bin ', GIS' c: progra ~ 2 quantum Lisboa apps Python27 ' , GIS'c: progra ~ 2 quant Lisboa apps Python27 lib site-packages', GIS 'c: progra ~ 2 quantum Lisboa apps Python 27 lib site-packages PIL', GIS'c: progra ~ 2 quant Lisboa apps Python27 lib site-packages win32 ', GIS'c: progra ~ 2 quant Lisboa apps Python27 l ib site-packages win32 lib', GIS 'c: progra ~ 2 quant Lisboa apps Python27 lib site-packages Pythonwin ', GIS' c: progra ~ 2 quant Lisboa apps Python27 lib site-packages wx-2.8-msw-unicode ']
The software to fix your PC is just a click away - download it now.