How to upload printscreen in artifacts

Hello, I’m creating an automation in pure python, and in some part of code, if some ‘click’ fails, I want to take a screenshot to understand what happen in container. So what I have to do to the file upload to artifacts?

I tried to put the file on output folder, but didn’t work

By not working, does it produce an error? I tried with
browser_lib.take_screenshot(os.path.join(os.getcwd(), "output", "screen"))
and had no issues creating an screenshot in container.