Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

arcpy.MakeGraph_management works in ArcCatalog Python window but not Python/Pythonw

$
0
0
Dear All

I'm trying to get the ArcGIS 10.1 MakeGraph_management tool working in Python/Pythonw but keep on getting a 'python.exe/pythonw.exe has stopped working' error. However, when I run exactly the same code in the Python window of ArcCatalog or ArcMap it works as expected.

The code I'm trying to run is:
Code:

input_data = r'C:\smw\Workspace\ArcGIS10_1NetCDFTutorial\ArcGIS\ZonalStats01.gdb\ZonalStatistics'
out_graph = 'outGraph'
out_grf = r'C:\smw\Workspace\ArcGIS10_1NetCDFTutorial\Python\graph99.bmp'


print 'Creating graph...'
graph = arcpy.Graph()
print 'addSeriesLineVertical...'
graph.addSeriesLineVertical(input_data, 'MEAN', 'DATE')


print 'MakeGraph_management...'
arcpy.MakeGraph_management(arcpy.GraphTemplate(), graph, out_graph)
print 'SaveGraph_management'
arcpy.SaveGraph_management(out_graph, out_grf)

Does anybody have a solution or work around? I've tried searching but can't see if this is a known error/issue.

I'm running ArcGIS For Desktop 101. in Windows 7.



Many thanks in advance of any help that people can provide.



Best wishes, Simon.

Viewing all articles
Browse latest Browse all 2485

Trending Articles