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

populating a Python List and Queue.Empty error

$
0
0
I am working on a project where I simply want to create maps of the FHWA Functional Classifications for all the roads in a county. The field name in the roads layer is FUNC. I created a Python List with this name (func), and want to populate it with the functional class values. I keep getting Queue.Empty messages every time I run it.

I am a relative newbie at Python, and while I can intuitively get the flow involved--create list, go through rows in table, add values to the list--I don't know what code I'd use to fix this.

I have a gut feeling I might have to use GetValue to populate the List with the Functional Classification values in order for the script to really work, but I don't know how I'd write it.

Script results and Error message below, Script attached.

Thank you,

Dan B

*************************************************

SONOMA COUNTY FUNCTIONAL CLASSES and SEGMENTS

Map Extent of Data Frame is:
XMin: 6114361.750469, YMin: 1685797.745094,
XMax: 6477131.750469, YMax: 2180587.745094
Layer Name: SONOMA COUNTY STREETS
Longname: SONOMA COUNTY STREETS
StreetLayer name is: SONOMA COUNTY STREETS
Processing text elements...
Export Functional Class = 0
ARCPY ERRORS:


PYTHON ERRORS:
Traceback Info:
File "C:\Users\Owner\Desktop\GEOG 375\FINAL PROJECT\Brenner_FINAL_TEMPLATE_2_NJ_Coding.py", line 138, in <module>
ExportToPDF(mxd, mappath + 'Map ' + str(func_value) + '.pdf')

Error Info:
<class 'Queue.Empty'>:

Viewing all articles
Browse latest Browse all 2485

Trending Articles