<div dir="ltr">I want to create a simple plugin that uses grass. <br>My configuration is: <br>- OS: widows 7 64bit <br>- Python: 2.7.4 (32bit)<br>- Osgeo4W (32bit) with<br><br>   -Qgis: 2.12.0<br>   -Grass: 6.4.4<br>   -Python: 2.7.4<br><br>GISBASE=C:/OSGeo4W/apps/grass/grass-6.4.4<br>GISRC=C:/Users/intema/AppData/Roaming/GRASS6/.grassrc6<br>PYTHONPATH=%GISBASE%/etc/python;%GISBASE%/etc/python/grass;%GISBASE%/etc/python/grass/script<br>PATH=%GISBASE%/lib;%GISBASE%/bin;%GISBASE%/scripts;C:/OSGeo4W/bin<br><br>if I open a shell and start python and write the command import grass.script everything works.<br>if I open qgis and open the shell of python and write the command import grass.script I have the following error<br>  File "C:\OSGeo4W\apps\Python27\lib\subprocess.py", line 878, in _make_inheritable<br>    _subprocess.DUPLICATE_SAME_ACCESS)<br>WindowsError: [Error 6] Handle non valido<br><br>if I write in my plugin the command import grass.script I have the seame error.<br> <br>I followed the tutorial:<br><a href="https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly">https://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly</a><br><br>Please help I read all forum that reported the same mistake but I did not find solution .<br>Some indicate that the problem definition dell'stdin stdout and stderr .<br><br>I'm sorry for my english.</div>