Hi,
I can run this stage correctly in my local computer, but it fails the tests over the server. This is the error:
[your_program] Traceback (most recent call last):
[your_program] File “”, line 203, in _run_module_as_main
[your_program] File “”, line 88, in _run_code
[your_program] File “/app/app/main.py”, line 54, in
[your_program] main()
[your_program] ~~~~^^
[your_program] File “/app/app/main.py”, line 17, in main
[your_program] raise RuntimeError(“OPENAI_API_KEY is not set”)
[your_program] RuntimeError: OPENAI_API_KEY is not set
[tester::#AQ1] Expected program to exit with exit code 0, got 1 instead
[tester::#AQ1] Test failed
I change the OpenRouter service to the OpenAI service directly, but I don’t see why that would be a problem.
Here is my code:
def main():
p = argparse.ArgumentParser()
p.add_argument("-p", required=True)
args = p.parse_args()
if not API_KEY:
raise RuntimeError("OPENAI_API_KEY is not set")
client = OpenAI(api_key=API_KEY)#, base_url=BASE_URL)
Any help here?