Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

get_job_profile returns 401 #37

@eprikazc

Description

@eprikazc

Try following code:

import upwork
c = upwork.Client(PUBLIC_KEY, SECRET_KEY, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
c.job.get_job_profile('~01039b34ec50422991')

get_job_profile call fails with following exception:

Traceback (most recent call last):
  File "test.py", line 17, in <module>
    c.job.get_job_profile('~01039b34ec50422991')
  File ".venv/lib/python3.6/site-packages/upwork/routers/job.py", line 45, in get_job_profile
    result = self.get(url)
  File ".venv/lib/python3.6/site-packages/upwork/namespaces.py", line 34, in get
    return self.client.get(self.full_url(url), data)
  File ".venv/lib/python3.6/site-packages/upwork/client.py", line 177, in get
    return self.read(url, data, method='GET', fmt=self.fmt)
  File ".venv/lib/python3.6/site-packages/upwork/client.py", line 294, in read
    raise_http_error(url, response)
  File ".venv/lib/python3.6/site-packages/upwork/http.py", line 41, in raise_http_error
    headers, None)
upwork.exceptions.HTTP401UnauthorizedError: HTTP Error 401: Code 401: Verification of signature failed.

The issue exists only with urllib3==1.25+. With urllib3==1.24.2 it works ok. Looks like the issue is caused by the the way urllib3==1.25+ treats URLs containing ~ - this symbol gets encoded to %7E.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions