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.

Upwork example code throws timeout and  #41

@robot-apocalypse

Description

@robot-apocalypse

I've been trying to work with this library for several days now, in both python 2 and 3 (it's not even a little functional in python 3, you should remove that note).

I followed the Upwork API Reference here: https://developers.upwork.com/?lang=python#getting-started_libraries-and-tools.

Specifically:

$ mkdir upwork_project
$ cd upwork_project
$ virtualenv --no-site-packages ve
$ git clone https://github.com/upwork/python-upwork.git
$ cd python-upwork
$ source ../ve/bin/activate
$ python setup.py install

The instructions say the example code is in a folder called 'examples' which doesn't exist; instead I found desktop_app.py inside the 'upwork' folder. After running:

$python desktop_app.py

amd entering my key and secret, I am able to authenticate and retrieve the verification code, and then I get this:

Retrieving keys.... 
OK
My info
Exception at GET https://www.upwork.com/api/auth/v1/info.json
Traceback (most recent call last):
  File "desktop_app.py", line 60, in <module>
    raise e
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f30086312d0>, 'Connection to www.upwork.com timed out. (connect timeout=0.5)')

I tried modifying the desktop_app.py code to set the TIMEOUT property on the client, but this is apparently a different timeout. So Instead I had to modify client.py to change the HARDCODED timeoute from 0.5 to 20, which allows me to get past the timeout. However I then get:

Retrieving keys.... 
OK
My info
[REDACTED]
Team rooms:
Exception at GET https://www.upwork.com/api/auth/v1/info.json
Traceback (most recent call last):
  File "desktop_app.py", line 60, in <module>
    raise e
AttributeError: 'Client' object has no attribute 'team'

That looks like a bigger problem than I feel like troubleshooting, so figured I'd let you guys know.

Tested in python 2.7.16 on ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions