Does your SDE connection use OS authentication or database authentication? And is the path in your script the actual path to the SDE connection file? Not something like "Database Connections\SDE_admin.sde"?
Most likely cause is the local user isn't authorized to access the database using their OS credentials.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.