Select to view content in your preferred language

Arcpy.da.Walk() not reading .aprx files while os.walk() does

594
3
Jump to solution
08-08-2023 12:41 PM
Oliver_Sandoval_e
New Contributor III

Hello,

Has anyone had any issues with arcpy.da.Walk() not reading aprx files before?

I recently downgraded from Pro 3.0 to 2.8(with all patches) and in 3.0 I was able to find aprx files in the directory using da.Walk(). However, after downgrading I can't seem to get it to work, but os.walk() does.

Thank you for your time!

0 Kudos
1 Solution

Accepted Solutions
gprince
New Contributor II

hi Oliver, yes this is an issue we addressed in the Pro 2.9 release.

Workaround is to switch your code to using python's os.walk functionality. Of course os.walk is for walking files in a folder tree, which works fine for ".aprx" files. You'll find it's easy to adjust your code to it since we  modeled arcpy.da.Walk after it.  

View solution in original post

3 Replies
RhettZufelt
MVP Notable Contributor

It seems to find them in 2.9.3 just fine.

R_

gprince
New Contributor II

hi Oliver, yes this is an issue we addressed in the Pro 2.9 release.

Workaround is to switch your code to using python's os.walk functionality. Of course os.walk is for walking files in a folder tree, which works fine for ".aprx" files. You'll find it's easy to adjust your code to it since we  modeled arcpy.da.Walk after it.  

Oliver_Sandoval_e
New Contributor III

Awesome thank you! We will be moving to 2.9 soon! 👍 😁🙌 😊

0 Kudos