Error 001156: Failed on input OID -1, could not write value to output field (ArcPy)

by Wazzy24   Last Updated September 07, 2018 15:22 PM

I have written a script that takes an excel file, reads it into Pandas and creates two data frames based on the value inside a column ('Place'). From there I read the Pandas data frames back to CSV files and am trying to push those tables into a Geodatabase.

I have received this error: `

arcgisscripting.ExecuteError: ERROR 001156: Failed on input OID -1, could not write value '2349185752' to output field Five_or_more_unit_value

`

def loadPermits():
  ResidentialPermits = "2017 Residential Building Permits.xlsx"
  Permits_Input_File = os.path.join(CensusInput_Folder, ResidentialPermits)

  permits_pandas = pandas.read_excel(open(Permits_Input_File, 'rb'))

  place_pd = permits_pandas.loc[permits_pandas['Place'].notnull()]
  county_pd = permits_pandas.loc[permits_pandas['Place'].isnull()]

  output_table =  place_pd.to_csv('places.csv')
  output_table = county_pd.to_csv('counties.csv')

  arcpy.TableToTable_conversion('places.csv', os.path.join(GDB_Path), 
  'places')
  arcpy.TableToTable_conversion('counties.csv',os.path.join(GDB_Path), 
  'counties')

loadPermits()


Related Questions


Updated July 23, 2018 15:22 PM

Updated March 13, 2016 08:09 AM

Updated November 15, 2018 14:22 PM

Updated September 05, 2018 18:22 PM

Updated November 06, 2018 12:22 PM