zoomToSelectedFeatures breaking on 12th iteration of loop

2828
0
07-26-2015 02:07 PM
AndyBradford1
New Contributor

I'm working on a script to iterate through water-sampling stations, select the parcels within a distance of them, and build a PDF report for each station and its associated parcels. This is a tutorial exercise from "GIS Tutorial For Python Scripting."

For the first eleven stations, the script is working fine, from the print statements I seeded throughout the loop. But on Station 12, it's breaking on this line:

    myDF.zoomToSelectedFeatures()

This line is supposed to zoom to the selected parcels. Here's the error message it's giving me:

AttributeError: 'float' object has no attribute 'zoomToSelectedFeatures'

I have no idea why it's breaking on 12. Station 12 has one parcel selected, but so do about half the other stations that the program worked fine for. None of the reports output look odd.

What could be going wrong here, and what other information do I need to find and fix the problem?

0 Kudos
0 Replies