POST
|
Using an InsertCursor instead looks to have fixed my problem. It's quite a few more lines of code in setup of the feature class and a SearchCursor, but at least it works consistently. Thank you for this suggestion.
... View more
04-25-2018
09:14 PM
|
0
|
2
|
966
|
POST
|
I tried using double backslashes, raw strings with backslashes, forward slashes, and raw strings with forward slashes. None of those options changed my execution results.
... View more
04-25-2018
06:59 PM
|
0
|
0
|
966
|
POST
|
I'm working on a project to add point locations to a map using the arcpy.MakeXYEventLayer_managment tool in Python. This tool is acting unpredictable and causing a fatal EOFError (End Of File) exception every other time I run my script. Half the time it completes normally with no modifications. I've tried different inputs to the MakeXYEventLayer tool consisting of a .csv file, .dbf file, and a table view. None of these seem to make a difference. This is a current short snippet of the latest attempt: import arcpy
basePath = 'C:\Users\Jason\Documents\SchoolStuff\GEO 4393C'
workspacePath = basePath+'\FinalProject\Project.gdb'
arcpy.env.workspace = workspacePath
arcpy.env.overwriteOutput = True
locationsFilePath = basePath+'\FinalProject\Locations\MiniGolfLocations.xls'
locationsTable = 'MiniGolfLocations'
arcpy.ExcelToTable_conversion(locationsFilePath,locationsTable,'MiniGolfLocations')
print 'Done converting spreadsheet to table'
arcpy.MakeXYEventLayer_management(locationsTable,'LONGITUDE','LATITUDE','USpoints')
print 'Done creating xy event layer'
arcpy.CopyFeatures_management('USpoints',workspacePath+'\USpoints')
print 'Done creating USpoints' Has anyone else run into this problem before or have any suggestions?
... View more
04-25-2018
09:17 AM
|
0
|
7
|
1458
|
Online Status |
Offline
|
Date Last Visited |
05-01-2021
10:50 PM
|