AnswerBun.com

Shell=false generates OsError

Stack Overflow Asked by Azza ABIDI on December 10, 2020

I want to execute this code as a part of exporting rasters images

cmd = ['polygonize.py','date.tif','-f','GeoJSON','date.geojson','date','ID']
subprocess.call(cmd,shell=True )

but it generates this error

OSError: [WinError 193] %1 is not a valid Win32 application 

I found solutions that deletes pandas I uninstalled it but same issue persists

One Answer

You can't run py files in windows. Run it with python:

cmd = ['python', 'polygonize.py','date.tif','-f','GeoJSON','date.geojson','date','ID']

Note that this requires python to be in your PATH variable

Answered by Aplet123 on December 10, 2020

Add your own answers!

Related Questions

Using user input to retrieve data

1  Asked on January 1, 2022 by phast

     

What does “Cch” mean in StringCchPrint*?

1  Asked on January 1, 2022 by ari-sweedler

 

How to encode base_64 without slash in PHP?

1  Asked on January 1, 2022 by burhan

     

Issue with event listener and value not updating

1  Asked on January 1, 2022 by penone

 

Cannot package signed Java security providers with JMOD

1  Asked on January 1, 2022 by travesty

   

Unity and C# DebugLog Not Printing Everything

1  Asked on January 1, 2022 by a4treok

   

activate virtualenv in git bash using pycharm on windows

4  Asked on January 1, 2022 by mostafa-ghadimi

       

passing data from javascript variable to an ejs variable

1  Asked on January 1, 2022 by kevin-terblanche

     

How to scrape all topics from twitter

2  Asked on January 1, 2022 by suraj-subramanian

         

Using lodash to modify object

2  Asked on January 1, 2022 by prova12

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP