How to check and modify permissions of files in hidden directories using python

I am trying to use subprocess with find or os.walk to locate certain files in hidden directories and list their permissions and change them. I am running as root. but no matter what I try the hidden directories are not seen. when I do the equivalent in a terminal with a shell command all is good.

You will need to provide details on what you are doing.
Include which os you are using and a code sample that fails.

In what sense / by what means are the directories “hidden”?

What operating system is this?

It turns out this directory was created after my code tried to read it