Select to view content in your preferred language

ListFeatureClasses : no result

1454
7
Jump to solution
02-28-2018 04:46 AM
MagalyClément-Zaber
Regular Contributor

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

0 Kudos
1 Solution

Accepted Solutions
MagalyClément-Zaber
Regular Contributor

I found the solution : uninstalling Oracle 64

Installation Oracle 64

I works fine

In my opinion, there was a problem installing Oracle 64-bit

View solution in original post

0 Kudos
7 Replies
JoshuaBixby
MVP Esteemed Contributor

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.

0 Kudos
MagalyClément-Zaber
Regular Contributor

#-*- 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.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

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?

0 Kudos
MagalyClément-Zaber
Regular Contributor

"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.

0 Kudos
MagalyClément-Zaber
Regular Contributor

On my machine :

desc.dataElementType ==> DEWorkspace

On the Server :

desc.dataElementType ==> DEFile

Same sde file.

Same User.

I am lost 😞

0 Kudos
MagalyClément-Zaber
Regular Contributor

I found the solution : uninstalling Oracle 64

Installation Oracle 64

I works fine

In my opinion, there was a problem installing Oracle 64-bit
0 Kudos