ERROR
This error can occur on any of the ArcGIS-related Python functions or core Python modules. When running a Python script, the script fails and references the following error:
"ValueError: Bad marshal data"
Bad marshal data Python error
![[O-Image] Bad marshal data example code](https://webapps-cdn.esri.com/CDN/support-site/technical-articles-images/000011731/00N39000003LL24-0EM39000000wdOa.png)
A .pyc file ('compiled' Python file) in the Python install folder has become corrupt. These files are used by Python to speed up the start-up and usage of the .py files that are used in scripting.
Version 10.1:
• C:\Python27\ArcGIS10.1
• C:\Python27\ArcGISx6410.1 (if the 64-bit background geoprocessing upgrade is installed)
• C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy
• C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy (if on 32-bit only machine)
Version 10.0:
• C:\Python26\ArcGIS10.0
• C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy
• C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy (if on 32-bit only machine)
Article ID: 000011731
Get help from ArcGIS experts
Start chatting now