I'm trying to convert tab to shape files. When I run the code, I see the tab files(list) but I get the error using QuickImport.. Can somebody suggest a fix? My tab files are located in folders undernealth archive.

import arcpy
import env
import os

workspace = "Z:/STAGING/archive"

#returns @string list of feature classes
walk = arcpy.da.Walk(workspace, datatype="Any", type="All")

for dirpath,dirnames, filenames in walk:
    print filenames
#Set local variables for QuickImport
tabfiles = "Z:/STAGING/archive/**/*.TAB"
output_gdb = "c:/Temp/results.gdb"

# Execute Quick Import

Traceback (most recent call last): File "C:\polygeo\Scripts\tab to shape.py", line 42, in arcpy.QuickImport_interop(tabfiles,output_gdb) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\interop.py", line 104, in QuickImport raise e ExecuteError: NULL pointer check failed. File: geodbfeatureclass.cpp Line #: 985 A fatal error has occurred. Check the logfile above for details Tool execution failed.

Failed to execute (QuickImport).

This is a minimal code snippet that I think will illustrate the same error:

import arcpy
tabfiles = "Z:/STAGING/archive/**/*.TAB"
output_gdb = "c:/Temp/results.gdb"
  • I'm unfamiliar with the syntax that you are using with QuickImport and I think it would be easier to use FeatureClassToFeatureClass rather than QuickImport. If you want to persevere with QuickImport then I think your code snippet can be reduced a lot. I'll do this as an edit to your question.
    – PolyGeo
    Commented Aug 28, 2016 at 23:48

3 Answers 3


I don't think your parameters are valid.

Try running a single file conversion with this syntax:

arcpy.QuickImport_interop(r"MITAB, C:\GIS\VancouverLandBoundary.tab", r"C:\Van.gdb")

and you are supposed to get the error:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. An input dataset must be given.

However, adding a data format will let the code to be executed properly:

arcpy.QuickImport_interop(r"MITAB, C:\GIS\VancouverLandBoundary.tab", r"C:\Van.gdb")

However, using a wildcard syntax doesn't work for me either. When running this line:

arcpy.QuickImport_interop(r"MITAB, C:\GIS\MapInfo\**\*.tab",r"C:\VanAll.gdb")

I also get the error message:

arcgisscripting.ExecuteError: NULL pointer check failed. File: geodbfeatureclass.cpp Line #: 1010 A fatal error has occurred. Check the logfile above for details Tool execution failed. Failed to execute (QuickImport).

It might be a conflict with other FME installations I have on the same machine.

So, if your single run conversion works (as mine does), you could use the Python os.walk to find all .tab files and then run this conversion for each of the files.

  • Thanks for your answer. In my code above da.walk() successfully lists all tab files in my workspace but QuickImport converts only the first tab file in the list and doesn't touch the remaining tab files in the list. How can I get QuickImport to convert all the tab files in the list and not just the first one in the list? Commented Aug 30, 2016 at 4:17
  • The single file conversion you mentioned worked too for me but I had to remove MITAB from it. So yes its working on a single tab file only.. arcpy.QuickImport_interop(r"C:\GIS\VancouverLandBoundary.tab", r"C:\Van.gdb") How can I get it to convert multiple tab files? Commented Aug 30, 2016 at 4:30
  • 1
    Use Python for loop and replace the path to the file with r"C:\GIS\{0}​".format(path) Commented Aug 30, 2016 at 6:52
  • Could you expand please on your last comment about the for loop? What should it look like and where should it go in my code to convert tab files? Commented Aug 30, 2016 at 22:53
  • 1
    Please refer to the Python help to learn about using the for loop wiki.python.org/moin/ForLoop. You create a list of paths to your tab files and then run in the for loop every .tab file conversion. Commented Aug 31, 2016 at 5:49

Got the same error with MIF/MIDs.

Looks like your parameters are almost valid and problem is with hidden additional parameters. If you try to run Quick Import directly from toolbox and give it your wild-card (**.TAB) and take a look at full script line you will see something like this:


So if you want to run Quick Import from python, try the following:

add_line = '"RUNTIME_MACROS,...copy everything here...,__FME_DATASET_IS_SOURCE__,true"'
tab_files = "MITAB Z:/STAGING/archive/**/*.TAB"
output_gdb = "c:/Temp/results.gdb"
arcpy.QuickImport_interop(tab_files + ',' + add_line, output_gdb)

Hope this helps.


The ArcGIS Help Suggests using the Quick Import GP tool in ArcMap/ArcCatalog and copying the syntax to a python snipit once working.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.