Hi!
Here is a script that works on my machine :
#-*- coding: utf-8 -*-
import arcpy
arcpy.env.workspace = r"\\nassig\service$\geomatique\archi\6-Traitements\2-Python-36\2-Execution\cnx\PROD_donvdr_DC.sde"
print(arcpy.env.workspace)
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
print(fc)
call "C:\PROGRA~1\ArcGIS\Pro\bin\Python\Scripts\propy" \\NASSIG\service$\geomatique\archi\6-Traitements\2-Python-36\1-Scripts\tests\test.py
It doesn't work on my server. I have no error.
Any idea ?
Thanks for help !
Python 3.6.2
Solved! Go to Solution.
I found the solution : uninstalling Oracle 64
Installation Oracle 64
I works fine
In my opinion, there was a problem installing Oracle 64-bit
Given the path, it looks like there is a network file share containing the SDE connection file. If so, are the same user credentials being used on your machine and server to run the script? To eliminate the network file share as a potential problem, copy the SDE connection file local to the server and point the script to the local copy.
#-*- coding: utf-8 -*-
import arcpy
arcpy.env.workspace = r"D:\temp\cnx\PROD_donvdr_DC.sde"
print(arcpy.env.workspace)
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
print(fc)
Result :
D:\temp>call "C:\PROGRA~1\ArcGIS\Pro\bin\Python\Scripts\propy" D:\temp\test.py
D:\temp\cnx\PROD_donvdr_DC.sde
Appuyez sur une touche pour continuer...
I can connect to D:\temp\cnx\PROD_donvdr_DC.sde from ArcCatalog
It's the same user.
I am stumped. I can't understand why it is asking for user input, 'Appuyez sur une touche pour continuer," when run from the server. Nothing I see in the code snippet indicates you should see that. You have Pro installed on the server and configured the same way as on your local machine?
"Appuyez sur une touche pour continuer..." appears when the batch is finished ("pause")
call "C:\PROGRA~1\ArcGIS\Pro\bin\Python\Scripts\propy" D:\temp\test.py
pause
It is "normal"
I have Pro 2.1 on the two machines.
On my machine :
desc.dataElementType ==> DEWorkspace
On the Server :
desc.dataElementType ==> DEFile
Same sde file.
Same User.
I am lost 😞
I found the solution : uninstalling Oracle 64
Installation Oracle 64
I works fine
In my opinion, there was a problem installing Oracle 64-bit