Insert cursor: No support for this geometry type.

4360
14
12-09-2013 07:08 AM
SebastianBlesgen
New Contributor
Hi,

I try to do a [PHP]arcpy.InsertCursor("db.sde/db.dbo.IMPORT")[/PHP] but I have this exception:
[PHP]
ERROR 999999: Error executing function.\nNo support for this geometry type.')[/PHP]

[PHP]
    targetFeatures = arcpy.InsertCursor("db.sde/db.dbo.IMPORT")
  File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\__init__.py", line 1214, in InsertCursor
    return gp.insertCursor(dataset, spatial_reference)
  File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\geoprocessing\_base.py", line 369, in insertCursor
    self._gp.InsertCursor(*gp_fixargs(args, True)))
[/PHP]

My gdb is an SQL Server I created by myself then I use arcpy to create the used .sde and the IMPORT table. This table has a "Shape" field with polygon geometry type.

What this exception means? I'm using the 10.2 version and it worked with 10.0...
Tags (2)
0 Kudos
14 Replies
T__WayneWhitley
Frequent Contributor
Just checking - the table is registered with the geodatabase?
0 Kudos
SebastianBlesgen
New Contributor
registered?

EDIT: how I created the table
[PHP]
arcpy.CreateFeatureclass_management( out_path, "IMPORT", geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3)
[/PHP]
0 Kudos
SebastianBlesgen
New Contributor
Again, I created the table (feature?) with
[PHP]arcpy.CreateFeatureclass_management( out_path, "IMPORT", geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3)  [/PHP]

But I'm not sure that it means I created a GDB!?

I actually have no rights to use the "Enable Enterprise Geodatabase" tool in ArcCatalog (license doesn't allow).
Do I have to use an other Desktop 10.2 edition and use this tool before creating the features?
0 Kudos
T__WayneWhitley
Frequent Contributor
I'm sorry Sebastian, don't mean to leave you hanging but I'm at a loss as to what is going on exactly -- I thought you said you could at least view the feature class you created in ArcMap (or Catalog).  I don't think that necessarily means you can return an InsertCursor on it, which was why I suggested you make sure the feature class is 'registered with the geodatabase', but guess that is done by default if the create fc tool ran successfully?  If you haven't created an enterprise geodatabase then that could explain if you can 'read' SQL tables and not feature class tables, I'm not sure though, check that out.

Can you execute other ArcGIS tools on the layer?...or at least verify the feature class was successfully created (you could even run a 'if arcpy.Exists...' command on it and get back a message if evals True, or better yet get any returned messages (whether error or not) at that stage.

Interesting problem though...please post the solution when you finally have it.

Wayne



EDIT:  My apologies, I noticed I entered a typo in your name.  So, any progress with this yet?
0 Kudos
SebastianBlesgen
New Contributor
Sorry, I'm late. But the problem was that I didn't create the GDB (enable it as "G") before creating the features.
So easy... :rolleyes:
0 Kudos