WORKAROUND: "OperationalError" Traceback importing GIS file

Products and version affected

Geo - All versions

Geothermal - All versions

Hydro - All versions

Issue

The user attempts to import a GIS object and encounters the following traceback:

Most Recent Project: C:\Some stuff\My project.aproj
Platform: AMD64
Traceback (most recent call last):
File "source\applications\source\asynclib\_async.py", line 174, in run_callback_list
File "source\applications\source\asynclib\_async.py", line 203, in callback
File "source\applications\source\client\client_project.py", line 48, in stop
File "source\applications\source\asynclib\_async.py", line 115, in run_function
File "source\applications\source\enginewrapper\_enginewrapper.py", line 413, in __method_call
File "source\applications\source\engine\project.py", line 628, in import_GIS
File "source\applications\source\engine\simple_features.py", line 206, in load_GIS
File "source\applications\source\engine\simple_features.py", line 159, in _loadPolygons
File "source\applications\source\engine\simple_features.py", line 53, in _loadValueData
File "source\applications\source\engine\simple_features.py", line 37, in _loadData
File "source\applications\source\engine\project.py", line 280, in new_block
File "source\applications\source\engine\cwdbblocks.py", line 65, in __init__
File "source\applications\source\engine\dbblocks.py", line 197, in __init__
File "source\applications\source\engine\dbblocks.py", line 365, in _initTable
File "source\applications\source\engine\dbblocks.py", line 301, in _create_table_from_data
File "source\applications\source\common\db.py", line 764, in create
File "source\applications\source\common\db.py", line 696, in exe
OperationalError: duplicate column name: shapeid 

This is caused by a bug in leapfrog that causes certain GIS object to fail on import due a problem caused by the names of attributes stored in the GIS file. This bug affects files containing more than one attribute named: 'ID', 'shapeID',  or  'FID'. Internal, Geo treats these names as 'shapeID', thus a file which has say 'ID' and 'shapeID' attribues is treated as if both are named 'shapeID' and this causes a conflict which in turn results in a traceback.

Workaround

The workaround is fairly straightforward. Simply rename the conflicting attributes on import. This is shown in the screenshots below:

fig1.jpg

 

fig2.jpg

 

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk