How to access GitLab CI/CD secure file from Python script?

Hi, I’ve successfully added GitLab Secure File into my YAML configuration (and confirmed with ls-lah showing the file in the output, however I’m having trouble with accessing the secure file from within my Python script. My secure file lives within a folder named test-folder so in my Python script, I tried the following:

with open('test-folder/file_name', "rb") as key:

However in my pipeline output it’s showing this error:

FileNotFoundError: [Errno 2] No such file or directory: 'test-folder/file_name'

Any ideas on how I can access my secure file? Any help is appreciated!

GitLab CI/CD python cicd secure

Can you show the ls -lah output from the CI/CD job log? I’m curious about file permissions being an issue here.