0

Can't access Shotgun data. Proxy Server problem?

In the code below I get an error when I call the find_one method.  The error is socket.gaierror: [Errno 11001] getaddrinfo failed. I am able to access Shotgun's data normally from home when there's no proxy server, but not within my work place.  Any ideas?

 

# ---------------------------------------------------------------------------------------------
# Imports
# ---------------------------------------------------------------------------------------------

from shotgun_api3 import Shotgun

# ---------------------------------------------------------------------------------------------
# Globals
# ---------------------------------------------------------------------------------------------
SERVER_PATH = ...
SCRIPT_NAME = ...
SCRIPT_KEY = ...
HTTP_PROXY = 'http://proxy-van:3128'
# ---------------------------------------------------------------------------------------------
# Main
# ---------------------------------------------------------------------------------------------

if __name__ == '__main__' :
    
    sg = Shotgun(base_url = SERVER_PATH, script_name = SCRIPT_NAME, api_key = SCRIPT_KEY, http_proxy = HTTP_PROXY)
    filters = [[ "name", "is", "Demo Project"]]
    proj = sg.find_one("Project", filters)

 

 

Here's the entire traceback:

Traceback (most recent call last):
  File "test.py", line 25, in <module>
    proj = sg.find_one("Project", filters)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 452, in find_one
    result = self.find(entity_type, filters, fields, order, filter_ope
retired_only)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 424, in find
    resp = self._api3.read(req)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 717, in callable
    return self.meta_caller(attr, *args, **kwargs)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 732, in meta_caller
    (self.__class__.__name__, attr, self.__class__.__name__)
  File "<string>", line 1, in <module>
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 2023, in __call__
    return self.__send(self.__name, args)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 2411, in __request
    verbose=self.__verbose
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 2057, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 2089, in single_request
    self.send_content(h, request_body)
  File "C:\Documents and Settings\kristofer.castro\Shotgun\sg-python-a
_api3.py", line 2223, in send_content
    connection.endheaders()
  File "C:\Python25\lib\httplib.py", line 868, in endheaders
    # trap 'Broken pipe' if we're allowed to automatically reconnect
  File "C:\Python25\lib\httplib.py", line 740, in _send_output
    `skip_accept_encoding' if True does not add automatically an
  File "C:\Python25\lib\httplib.py", line 699, in send
    self.connect()
  File "C:\Python25\lib\httplib.py", line 683, in connect
    raise socket.error, msg
  File "C:\Python25\lib\socket.py", line 498, in create_connection

socket.gaierror: [Errno 11001] getaddrinfo failed

 

2 comments

  • 0
    Avatar
    Ben Hadden

    Hi Kristofer,

    I'm going to pass this along to our tech team to check this out.  In the future, feel free to email support@shotgunsoftware.com for urgent issues like this.

  • 0
    Avatar
    KP

    Kristofer,

    That error is similar to a DNS error in that it signifies that it can't resolve a server name to an address. From your workplace machine where you're running the script, check to see in a terminal if you can get any info back using nslookup.

    $ nslookup proxy-van
    $ nslookup <your shotgun server url>

     

    My guess is that the proxy server address isn't resolving correctly. 

Please sign in to leave a comment.