Quantcast
Channel: Forums - Geoprocessing
Viewing all articles
Browse latest Browse all 1952

Arcpy Export report error

$
0
0
Hello all,

I'm working on trying to use arcpy to automate the creation of a report, but I'm running into a problem.

Code:

>>> arcpy.mapping.ExportReport('2013pp',"C:\reports\2013_Graffiti.rlf","C:\reports\2013_Graffiti_report.pdf")

    Runtime error
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_
        return fn(*args, **kw)
      File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\mapping.py", line 506, in ExportReport
        assert isinstance(report_source, (MapDocument, TableView, Layer)), str(type(report_source))
    AssertionError: <type 'str'>

I'm having trouble deciphering the traceback as it seems to reference a variety of internal python files. In trouble shooting so far, I thought the problem might be that the report_source needs to be a layer file and I was using a .shp so I converted to a .lyr but then I get the error:

Code:

    Parsing error SyntaxError: invalid syntax (line 1)
Any advice would be greatly appreciated,
Best,
David

Viewing all articles
Browse latest Browse all 1952

Trending Articles