ArcPy.DA runs on 32 bit not 64

1388
6
Jump to solution
04-28-2020 03:50 PM
EricFulcher1
New Contributor III
So the following script worked on Arcpy 32 bit but not on 64 bit IDLE. Any thoughts? 10.6.1 arcgis. 
ALSO - this works against an fgdb but not an enterprise geodatabase (Oracle).
Thanks,
Eric
arcpy scripting‌
--- Script
import arcpy
arcpy.env.workspace = "D:/WOBufferScripts/GLSVDEVL@GLS.sde"
arcpy.da.SearchCursor("GLS.MWO", ['SHAPE@'], "OBJECTID > 0")
print "It Worked"
--- 32 Bit Results
32 BIT
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================== RESTART: D:\WOBufferScripts64bit\test.py ==================
It Worked
>>> 
--- 64 Bit Results
64 bit
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
================== RESTART: D:\WOBufferScripts64bit\test.py ==================
Traceback (most recent call last):
  File "D:\WOBufferScripts64bit\test.py", line 4, in <module>
    arcpy.da.SearchCursor("GLS.MWO", ['SHAPE@'], "OBJECTID > 0")
RuntimeError: cannot open 'GLS.MWO'
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

You likely have a configuration issue with your 64-bit Oracle client.  Make sure both your 32-bit and 64-bit Oracle clients are installed and configured properly.

View solution in original post

6 Replies
JoeBorgione
MVP Emeritus

I don't have an answer but when it comes to cursors, I like to set up a variable for the feature class or table name that you are cursoring through:

fc = r'D:/WOBufferScripts/GLSVDEVL@GLS.sde/GLS.WMO'
arcpy.da.SearchCursor(fc, ['SHAPE@'], "OBJECTID > 0")
That should just about do it....
0 Kudos
EricFulcher1
New Contributor III

um so do I. simplified the code to 3 lines to isolate the issue.

0 Kudos
DanPatterson_Retired
MVP Emeritus

It was a while ago, but didn't you have to install python for Background Geoprocessing to get 64 bit arcpy?

0 Kudos
EricFulcher1
New Contributor III

I have both 32 and 64 bit installed. the results are from each on the same server.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

You likely have a configuration issue with your 64-bit Oracle client.  Make sure both your 32-bit and 64-bit Oracle clients are installed and configured properly.

EricFulcher1
New Contributor III

Correct sir! - I had forgotten to put tnsnames in the 64 bit directory

0 Kudos