Hi all,
I keep running into this error message 160145: Field is Not Nullable.
I am using the Load data using workspace excel file
I am having trouble with mapping from a point feature class "Loads" to Electric Device feature class.
I have Checked all the fields that are not nullable, and I am almost 100% sure I have assigned values to them all unless I keep missing something. I also checked my source data and there is nothing null in my source, mapping calculated fields also says 100% filled factor.
I have attached photos below of my fields that don't allow nullable values in the target dataset and also a photo of the source dataset mapping.
I am just not sure why it keeps saying there is a null value in a not nullable field, when all the not nullable fields are being populated with values.
Maybe I need an extra set of eyes on this to help me see my error and what I am missing, also I did not populate the string categories but that has never mattered before all my other data loads worked with empty string columns and I tried filling those and it made no difference.
Any and all suggestions are welcomed
Thank you!
Can you include a copy of the gp messages from the data loading tool that show the error message? Did it generate any .fid files?
Also, I'd recommend not putting values in the system managed fields (associationstatus, subnetworkname, supportedsubnetworkname, supportingsubnetworkname, tiername, tierrank, isconnected, issubnetworkcontroller). You can also leave those other unused phase fields unmapped so they have the default (de-energized)
Hi Robert,
Thank you for the reply, below is the full error message I get when I run my code:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2233, in LoadDataUsingWorkspace
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2230, in LoadDataUsingWorkspace
retval = convertArcObjectToPythonObject(gp.LoadDataUsingWorkspace_management(*gp_fixargs((in_workbook,), True)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
arcgisscripting.ExecuteError: ERROR 160145: The field is not nullable.
Failed to execute (Append).
Failed to execute (LoadDataUsingWorkspace).
And here is the Messages from the Geoprocessing tool:
1874 row(s) from C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\OutputFolder\Output_Geodatabase.gdb\Nodes_XYTableToPoint were appended to C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\Electric Utility Network Foundation\Database\Electric_AssetPackage_InsertCommunityName.gdb\UtilityNetwork\StructureJunction
1874 row(s) from C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\OutputFolder\Output_Geodatabase.gdb\Nodes_ElectricJunction_XYTableToPoint were appended to C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\Electric Utility Network Foundation\Database\Electric_AssetPackage_InsertCommunityName.gdb\UtilityNetwork\ElectricJunction
10 row(s) from C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\OutputFolder\Output_Geodatabase.gdb\Nodes_Plant_XYTableToPoint were appended to C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\Electric Utility Network Foundation\Database\Electric_AssetPackage_InsertCommunityName.gdb\UtilityNetwork\StructureJunction
10 row(s) from C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\OutputFolder\Output_Geodatabase.gdb\Nodes_Plant_ElectricJunction_XYTableToPoint were appended to C:\Users\user\Desktop\Complete GIS Models\WatsonLakeGIS\Electric Utility Network Foundation\Database\Electric_AssetPackage_InsertCommunityName.gdb\UtilityNetwork\ElectricJunction
ERROR 160145: The field is not nullable.
Failed to execute (Append).
Failed script Load Data Using Workspace...
Failed to execute (LoadDataUsingWorkspace).
Failed at Tuesday, August 20, 2024 4:33:39 PM (Elapsed Time: 2 minutes 38 seconds)
First off, please log a case with support in case this turn out to be a bug.
Lets try a few things.
Hi, Robert
Thank you for taking the time to help me. I used the data loading preview, and it loaded the data fully but also highlighted a null field. Turns out I had an anomaly in my dataset, so all good now.