Skip to content

[BUG]: python main.py script uses OpenAI_API URL by default when choosing any resume/cv generating options #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jyshnkr opened this issue Mar 15, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@jyshnkr
Copy link

jyshnkr commented Mar 15, 2025

Describe the bug

The python main.py script uses OpenAI_API URL by default when choosing any resume/cv generating options

Steps to reproduce

  1. Run python main.py
  2. Click on one of these options below:
    • Generate Resume
    • Generate Resume Tailored for Job Description
    • Generate Tailored Cover Letter for Job Description
  3. Choose resume style
  4. You will encounter the following error:
DEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 401, b'Unauthorized', [(b'Date', b'Sat, 15 Mar 2025 05:14:00 GMT'), (b'Content-Type', b'application/json; charset=utf-8'), (b'Content-Length', b'358'), (b'Connection', b'keep-alive'), (b'vary', b'Origin'), (b'x-request-id', b'req_e99ac0fa2e517e5a1d44b9f8f65defc9'), (b'strict-transport-security', b'max-age=31536000; includeSubDomains; preload'), (b'cf-cache-status', b'DYNAMIC'), (b'X-Content-Type-Options', b'nosniff'), (b'Server', b'cloudflare'), (b'CF-RAY', b'9209865aeca9c2f8-IAH'), (b'alt-svc', b'h3=":443"; ma=86400')])
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 401 Unauthorized"
DEBUG:httpcore.http11:receive_response_body.started request=<Request [b'POST']>
DEBUG:httpcore.http11:receive_response_body.complete
DEBUG:httpcore.http11:response_closed.started
DEBUG:httpcore.http11:response_closed.complete
DEBUG:openai._base_client:HTTP Response: POST https://api.openai.com/v1/chat/completions "401 Unauthorized" Headers({'date': 'Sat, 15 Mar 2025 05:14:00 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '358', 'connection': 'keep-alive', 'vary': 'Origin', 'x-request-id': 'req_e99ac0fa2e517e5a1d44b9f8f65defc9', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'cf-cache-status': 'DYNAMIC', 'x-content-type-options': 'nosniff', 'server': 'cloudflare', 'cf-ray': '9209865aeca9c2f8-IAH', 'alt-svc': 'h3=":443"; ma=86400'})
DEBUG:openai._base_client:request_id: req_e99ac0fa2e517e5a1d44b9f8f65defc9
DEBUG:openai._base_client:Encountered httpx.HTTPStatusError
Traceback (most recent call last):
  File "/Users/jayashankarmangina/Development/Jobs_Applier_AI_Agent/virtual/lib/python3.9/site-packages/openai/_base_client.py", line 1025, in _request
    response.raise_for_status()
  File "/Users/jayashankarmangina/Development/Jobs_Applier_AI_Agent/virtual/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://api.openai.com/v1/chat/completions'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
DEBUG:openai._base_client:Not retrying
DEBUG:openai._base_client:Re-raising status error

Expected behavior

Resume

Actual behavior

Erroring out

Branch

None

Branch name

No response

Python version

3.13

LLM Used

Claude

Model used

Claude 3.7 Sonnet - claude-3-7-sonnet-20250219

Additional context

There is a potential bug that invokes OpenAI url/ChatGpt when choosing generate resume/cv options from the menu

@jyshnkr jyshnkr added the bug Something isn't working label Mar 15, 2025
@Neo28A
Copy link

Neo28A commented Apr 4, 2025

same error

@Neo28A
Copy link

Neo28A commented Apr 4, 2025

Have you found any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants