TransWikia.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!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP