python api proxy issue

gamattoon
gamattoon
edited 12/09/19 in API & Developers

I am new to this.  Trying to write a basic python script that uses the smartsheet api.  It runs fine from my home desktop, via python for windows.  However, when I run it at work on my laptop, I am encountering the '[WinError 10061] No connection could be made because the target machine actively refused it' error.  I am assuming this is proxy related.  I tried adding a proxies value, with same result.  Can someone tell me how to overcome this error?  See my latest attempt below:

import smartsheet

proxies = {

    'http://user:pw@proxy.net:9119',

    'https://user:pw@proxy.net:9119'

    }

smartsheet = smartsheet.Smartsheet(access_token='blablabla',proxies=proxies)

action = smartsheet.Sheets.get_columns(sheetidhere, include_all=True)

columns = action.data

for col in columns:

    print(col.id)

    print(col.title)

    print('')

 

 

Comments