ListDatasets() returning empty array on sde workspace The Next CEO of Stack OverflowCompiling Python scripts (to .exe) that use ArcGIS Geoprocessing Tools?How do I expand the .SDE file specified in my current workspace?Entering date with arcpy.GetParameterAsText()?reference to workspace not setGetting full path of empty sde feature datasets (Children property from arcpy.Describe object won't work))Arcpy returning empty string when run in script, but not when run in ArcGIS DesktopSet workspace to SDE version using ArcPy?Extraction not empty data featureclass from a workspace by arcpy!Why is arcpy.ListUsers() not able to open SDE workspace?python Get current workspace and then re-source to new SDE

Multi tool use
Multi tool use

How do we know the LHC results are robust?

What's the best way to handle refactoring a big file?

If the heap is initialized for security, then why is the stack uninitialized?

Should I tutor a student who I know has cheated on their homework?

How do I construct this japanese bowl?

Why did we only see the N-1 starfighters in one film?

Why does standard notation not preserve intervals (visually)

How to capture whole Barcode value on Winform without using TextChanged event?

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

Is it safe to use c_str() on a temporary string?

What happens if you roll doubles 3 times then land on "Go to jail?"

Need some help with wall behind rangetop

How to make a variable always equal to the result of some calculations?

Science fiction short story involving a paper written by a schizophrenic

How to safely derail a train during transit?

Anatomically Correct Strange Women In Ponds Distributing Swords

Are there languages with no euphemisms?

Extracting names from filename in bash

Natural language into sentence logic

How did people program for Consoles with multiple CPUs?

Rotate a column

How do you know when two objects are so called entangled?

% symbol leads to superlong (forever?) compilations

How easy is it to start Magic from scratch?



ListDatasets() returning empty array on sde workspace



The Next CEO of Stack OverflowCompiling Python scripts (to .exe) that use ArcGIS Geoprocessing Tools?How do I expand the .SDE file specified in my current workspace?Entering date with arcpy.GetParameterAsText()?reference to workspace not setGetting full path of empty sde feature datasets (Children property from arcpy.Describe object won't work))Arcpy returning empty string when run in script, but not when run in ArcGIS DesktopSet workspace to SDE version using ArcPy?Extraction not empty data featureclass from a workspace by arcpy!Why is arcpy.ListUsers() not able to open SDE workspace?python Get current workspace and then re-source to new SDE










1















I am trying to get list of datasets within sde connection.This sde connection is already present in ArcMap and all datasets are visible. I am posting snapshot my code. It is returning empty array,though there are clearly many datasets available. What is the problem with my code?
enter image description here



import arcpy

arcpy.env.workspace = "C:UsersVijayAppDataRoamingESRIDesktop10.5ArcCatalogxxx.sde"
featureDatasets = arcpy.ListDatasets()
print featureDatasets
for fc in featureDatasets:
try:
print fc
except Exception as e:
print e









share|improve this question



















  • 3





    Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

    – BERA
    yesterday







  • 2





    Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

    – Michael Stimson
    yesterday






  • 1





    I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

    – Mansi
    yesterday






  • 1





    Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

    – Michael Stimson
    yesterday






  • 1





    It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

    – Vince
    23 hours ago















1















I am trying to get list of datasets within sde connection.This sde connection is already present in ArcMap and all datasets are visible. I am posting snapshot my code. It is returning empty array,though there are clearly many datasets available. What is the problem with my code?
enter image description here



import arcpy

arcpy.env.workspace = "C:UsersVijayAppDataRoamingESRIDesktop10.5ArcCatalogxxx.sde"
featureDatasets = arcpy.ListDatasets()
print featureDatasets
for fc in featureDatasets:
try:
print fc
except Exception as e:
print e









share|improve this question



















  • 3





    Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

    – BERA
    yesterday







  • 2





    Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

    – Michael Stimson
    yesterday






  • 1





    I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

    – Mansi
    yesterday






  • 1





    Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

    – Michael Stimson
    yesterday






  • 1





    It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

    – Vince
    23 hours ago













1












1








1








I am trying to get list of datasets within sde connection.This sde connection is already present in ArcMap and all datasets are visible. I am posting snapshot my code. It is returning empty array,though there are clearly many datasets available. What is the problem with my code?
enter image description here



import arcpy

arcpy.env.workspace = "C:UsersVijayAppDataRoamingESRIDesktop10.5ArcCatalogxxx.sde"
featureDatasets = arcpy.ListDatasets()
print featureDatasets
for fc in featureDatasets:
try:
print fc
except Exception as e:
print e









share|improve this question
















I am trying to get list of datasets within sde connection.This sde connection is already present in ArcMap and all datasets are visible. I am posting snapshot my code. It is returning empty array,though there are clearly many datasets available. What is the problem with my code?
enter image description here



import arcpy

arcpy.env.workspace = "C:UsersVijayAppDataRoamingESRIDesktop10.5ArcCatalogxxx.sde"
featureDatasets = arcpy.ListDatasets()
print featureDatasets
for fc in featureDatasets:
try:
print fc
except Exception as e:
print e






arcpy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Vince

14.8k32749




14.8k32749










asked yesterday









MansiMansi

123




123







  • 3





    Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

    – BERA
    yesterday







  • 2





    Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

    – Michael Stimson
    yesterday






  • 1





    I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

    – Mansi
    yesterday






  • 1





    Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

    – Michael Stimson
    yesterday






  • 1





    It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

    – Vince
    23 hours ago












  • 3





    Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

    – BERA
    yesterday







  • 2





    Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

    – Michael Stimson
    yesterday






  • 1





    I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

    – Mansi
    yesterday






  • 1





    Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

    – Michael Stimson
    yesterday






  • 1





    It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

    – Vince
    23 hours ago







3




3





Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

– BERA
yesterday






Add the code as text instead of a screenshot. What are you trying to list? For example ListDatasets will not list Feature Classes. Try adding an r in front of the path, r"C:...."

– BERA
yesterday





2




2





Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

– Michael Stimson
yesterday





Datasets or feature classes? What does it look like in ArcCatalog (ok to screen shot that and paste into your question). How are you running this? From catalog, IDLE, CMD, ArcMap? Is your username and password saved in that connection file?

– Michael Stimson
yesterday




1




1





I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

– Mansi
yesterday





I want list of feature datasets only.Feature classes are within datasets.And adding r at front of path, r"C:..." is still giving empty array.

– Mansi
yesterday




1




1





Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

– Michael Stimson
yesterday





Works just fine for me, either your credentials aren't stored in your connection file or the connecting user lacks permissions to view the datasets.. of course it could be that you're executing from the IDLE shell which is known to be a bit flaky, try it from the python window of ArcCatalog or ArcMap and see if that works.

– Michael Stimson
yesterday




1




1





It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

– Vince
23 hours ago





It does print the array of datasets. That array is empty. You should focus on whether os.path.exists(arcpy.env.workspace) returns True.

– Vince
23 hours ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316966%2flistdatasets-returning-empty-array-on-sde-workspace%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f316966%2flistdatasets-returning-empty-array-on-sde-workspace%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







8NkCwylUA,Qa ZFN,gbjGE0ivKOzlYFj 5NarPIY,2B LlIexKD,Hcm
xQ7mrJbE1K3ERDqen2V7oiONp5VmeLKs4pIAjCEoqXtb6w9qiSzt Um 2rF9Fc35gHofoCWuK

Popular posts from this blog

Ромео және Джульетта Мазмұны Қысқаша сипаттамасы Кейіпкерлері Кино Дереккөздер Бағыттау мәзірі

Гале (Шры-Ланка) Змест Геаграфія | Гісторыя | Інфраструктура | Славутыя мясціны | Гарады-пабрацімы | Галерэя | Спасылкі | НавігацыяHGЯOHGЯOgalle.mc.gov.lkГале на сайце ЮНЕСКАТурыстычны даведнікПорт ГалеКультура і гісторыяКаталіцкая царква ў Галерус.англ.фр.

ფილიპ IV (საფრანგეთი) ოჯახი | იხილეთ აგრეთვე | რესურსები ინტერნეტში | სანავიგაციო მენიუფილიპ IV - კათოლიკური ენციკლოპედიაPhilippe IV le Bel in Medieval History of NavarrePhilip IV – 1268 – 1314 – templarhistory.comThe Great Depression of the 14th Century – Murray N. Rothbardრ