I'm trying to automate several of our processes using Python in ArcGIS for Desktop 10.3. At least one of these tasks involves running a query against block group data provided by Business Analyst (BA). My problem is that I can't figure out how to bring the BA data in to do the query. My assumption is that I need to create a layer from the .bds file. Currently, my code looks like:

bg_file = r'C:\ArcGIS\Business Analyst\US_2014\Data\Demographic Data\esri_bg.bds'
bg_layer = 'bg_layer'
arcpy.MakeFeatureLayer_management(bg_file, bg_layer)

When I run this in a script (i.e., outside of ArcMap), I get:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset C:\ArcGIS\Business Analyst\US_2014\Data\Demographic Data\esri_bg.bds 
does not exist or is not supported
Failed to execute (MakeFeatureLayer).

Meanwhile, inside the python window of ArcMap, if I run:

arcpy.MakeFeatureLayer_management(r'C:\ArcGIS\Business Analyst\US_2014\Data\Demographic Data\esri_bg.bds', 'bg_layer')

I get:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   
File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 6520, in MakeFeatureLayer     
    raise e ExecuteError: ERROR 000229: Cannot open C:\ArcGIS\Business Analyst\US_2014\Data\Demographic Data\esri_bg.bds 
Failed to execute (MakeFeatureLayer).

which is a similar error, but seems slightly different.

Clearly, there's something I don't understand here. I'm able to use the MakeFeatureLayer_management function to create layers from other (non-bds) files. Is there something special about .bds files that prevents me from doing this? If so, what's the preferred method of creating layers from .bds files in arcpy?


It turns out that this was an issue with background processing. The problem was that during our installation of ArcGIS for Desktop, we installed the background processing module for Desktop, but somehow missed installing the background processing package for Business Analyst. In that case, I was able to run the code in the ArcMap Python window if I disabled background processing. Running the script outside required using the 32bit Python interpreter rather than the 64bit version. Ultimately, we fixed it by installing the BA background processing package. Now it works everywhere.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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