Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use Google Native Client SDK on Windows 7

I am trying Google's Native Client SDK.
OS is Windows 7, I've already installed python 2.7.9 and setup the environment variable path accordingly.
I also downloaded nacl_sdk.zip from https://developer.chrome.com/native-client/sdk/download and extracted it.
However, as I run the command "naclsdk list" as it is described on the download page, I got the following messages:


    C:\Temp\nacl_sdk>naclsdk list
    Traceback (most recent call last):
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 759, in 
        sys.exit(main(sys.argv[1:]))
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 752, in main
        InvokeCommand(args)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 741, in InvokeCommand
        command(options, args[1:], config)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 510, in Update
        manifest = LoadManifestFromURLs([options.manifest_url] + config.GetSources())
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 238, in LoadManifestFromURLs
        url_stream = UrlOpen(url)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 114, in UrlOpen
        return url_opener.open(request)
      File "C:\python27\lib\urllib2.py", line 431, in open
        response = self._open(req, data)
      File "C:\python27\lib\urllib2.py", line 449, in _open
        '_open', req)
      File "C:\python27\lib\urllib2.py", line 409, in _call_chain
        result = func(*args)
      File "C:\python27\lib\urllib2.py", line 1240, in https_open
        context=self._context)
    TypeError: do_open() got an unexpected keyword argument 'context'
    Traceback (most recent call last):
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 759, in 
        sys.exit(main(sys.argv[1:]))
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 752, in main
        InvokeCommand(args)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 741, in InvokeCommand
        command(options, args[1:], config)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 444, in List
        manifest = LoadManifestFromURLs([options.manifest_url] + config.GetSources())
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 238, in LoadManifestFromURLs
        url_stream = UrlOpen(url)
      File "C:\Temp\nacl_sdk\sdk_tools\sdk_update_main.py", line 114, in UrlOpen
        return url_opener.open(request)
      File "C:\python27\lib\urllib2.py", line 431, in open
        response = self._open(req, data)
      File "C:\python27\lib\urllib2.py", line 449, in _open
        '_open', req)
      File "C:\python27\lib\urllib2.py", line 409, in _call_chain
        result = func(*args)
      File "C:\python27\lib\urllib2.py", line 1240, in https_open
        context=self._context)
    TypeError: do_open() got an unexpected keyword argument 'context'

In fact, no matter what command I use, it doesn't seem to work at all.
Does anyone know the solution?

like image 618
Ian Huang Avatar asked Oct 31 '22 12:10

Ian Huang


1 Answers

having the same issue.

Found this link: http://forums.udacity.com/questions/100247273/urllib2-may-be-a-bug-to-find-the-appropriate-method-overload

Solved by editing python27/lib/urllib2.py...

Hope it helps!

like image 162
menrfa Avatar answered Nov 13 '22 02:11

menrfa