Fixed
Status Update
Comments
je...@google.com <je...@google.com> #2
using the below does resolve the issue and allow the app to be deployed.
gcloud config set app/use_gsutil true
gcloud config set app/use_gsutil true
co...@gmail.com <co...@gmail.com> #3
Thanks for the update! We think we have a handle on this issue, and there should be a patch in the Cloud SDK 106 release due out next week that will work with the 'use_gsutil false' setting (which will eventually become the new default).
je...@google.com <je...@google.com> #4
Hello,
Thank you for the clarification, I also noticed (and forgot to add in my previous comment) that you are using an old version of Cloud SDK (v265), have you tried updated your Cloud SDK version to the most recent one (v271) and checking if the error persist?. Also, if you connect with an username that doesn't have the "@" symbol are you able to connect properly?.
Thank you for the clarification, I also noticed (and forgot to add in my previous comment) that you are using an old version of Cloud SDK (v265), have you tried updated your Cloud SDK version to the most recent one (v271) and checking if the error persist?. Also, if you connect with an username that doesn't have the "@" symbol are you able to connect properly?.
co...@gmail.com <co...@gmail.com> #5
No problem. I have actually uninstalled the SDK to update to the newer
version and I am now facing an issue where upon installation I am
encountering the same TypeError as previously mentioned upon running the
install.bat file.
I believe this is probably related to the above issue with the proxy as I
guess that the google cloud sdk must be reading a config file somewhere. I
have tried to run this on a sepearte non proxied network but I am also
getting a connection error - I believe this is probably because it is
trying to still run the connection through the proxy. See the stack trace
below:
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 225, in <module>
main()
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 203, in main
Install(pargs.override_components, pargs.additional_components)
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 144, in Install
InstallOrUpdateComponents(to_install, update=update)
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 187, in
InstallOrUpdateComponents
['--quiet', 'components', verb, '--allow-no-backup'] + component_ids)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1010, in
Execute
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1043, in
_HandleAllErrors
exceptions.HandleError(exc, command_path_string,
self.__known_error_handler)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\exceptions.py", line 527,
in HandleError
core_exceptions.reraise(exc)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\exceptions.py", line 146, in
reraise
six.reraise(type(exc_value), exc_value, tb)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\six\__init__.py", line 693, in reraise
raise value
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 984, in
Execute
resources = calliope_command.Run(cli=self, args=args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 798, in
Run
resources = command_instance.Run(args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\surface\components\update.py", line 111, in Run
version=args.version)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 893, in Update
command_path='components.update')
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 603, in _GetStateAndDiff
command_path=command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 586, in _GetLatestSnapshot
*effective_url.split(','), command_path=command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
179, in FromURLs
for url in urls]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
179, in <listcomp>
for url in urls]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
200, in _DictFromURL
response = installers.ComponentInstaller.MakeRequest(url, command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\installers.py", line
296, in MakeRequest
return ComponentInstaller._RawRequest(req, timeout=timeout)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\installers.py", line
340, in _RawRequest
should_retry_if=RetryIf, sleep_ms=500)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\util\retry.py", line 181, in
RetryOnException
exceptions.reraise(exc_info[1], tb=exc_info[2])
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\exceptions.py", line 146, in
reraise
six.reraise(type(exc_value), exc_value, tb)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\six\__init__.py", line 693, in reraise
raise value
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\util\retry.py", line 162, in
TryFunc
return func(*args, **kwargs), None
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\url_opener.py", line 80, in
urlopen
return opener.open(req, data, timeout)
File "C:\Program Files\Python37\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "C:\Program Files\Python37\lib\urllib\request.py", line 543, in _open
'_open', req)
File "C:\Program Files\Python37\lib\urllib\request.py", line 503, in
_call_chain
result = func(*args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\url_opener.py", line 64, in
https_open
return self.do_open(build, req)
File "C:\Program Files\Python37\lib\urllib\request.py", line 1317, in
do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "C:\Program Files\Python37\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1275, in
_send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1224, in
endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1016, in
_send_output
self.send(msg)
File "C:\Program Files\Python37\lib\http\client.py", line 956, in send
self.connect()
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\httplib2\python3\httplib2\__init__.py",
line 1016, in connect
sock.connect((self.host, self.port))
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
434, in connect
self.__negotiatehttp(destpair[0], destpair[1])
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
380, in __negotiatehttp
headers += [self.__getauthheader(), "\r\n"]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
178, in __getauthheader
return "Proxy-Authorization: Basic " + base64.b64encode(auth)
File "C:\Program Files\Python37\lib\base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
On Fri, Nov 15, 2019 at 4:01 PM <buganizer-system@google.com> wrote:
version and I am now facing an issue where upon installation I am
encountering the same TypeError as previously mentioned upon running the
install.bat file.
I believe this is probably related to the above issue with the proxy as I
guess that the google cloud sdk must be reading a config file somewhere. I
have tried to run this on a sepearte non proxied network but I am also
getting a connection error - I believe this is probably because it is
trying to still run the connection through the proxy. See the stack trace
below:
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 225, in <module>
main()
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 203, in main
Install(pargs.override_components, pargs.additional_components)
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 144, in Install
InstallOrUpdateComponents(to_install, update=update)
File "dir\Google\Cloud
SDK\google-cloud-sdk\\bin\bootstrapping\install.py", line 187, in
InstallOrUpdateComponents
['--quiet', 'components', verb, '--allow-no-backup'] + component_ids)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1010, in
Execute
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 1043, in
_HandleAllErrors
exceptions.HandleError(exc, command_path_string,
self.__known_error_handler)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\exceptions.py", line 527,
in HandleError
core_exceptions.reraise(exc)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\exceptions.py", line 146, in
reraise
six.reraise(type(exc_value), exc_value, tb)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\six\__init__.py", line 693, in reraise
raise value
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 984, in
Execute
resources = calliope_command.Run(cli=self, args=args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 798, in
Run
resources = command_instance.Run(args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\surface\components\update.py", line 111, in Run
version=args.version)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 893, in Update
command_path='components.update')
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 603, in _GetStateAndDiff
command_path=command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\update_manager.py",
line 586, in _GetLatestSnapshot
*effective_url.split(','), command_path=command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
179, in FromURLs
for url in urls]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
179, in <listcomp>
for url in urls]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\snapshots.py", line
200, in _DictFromURL
response = installers.ComponentInstaller.MakeRequest(url, command_path)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\installers.py", line
296, in MakeRequest
return ComponentInstaller._RawRequest(req, timeout=timeout)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\updater\installers.py", line
340, in _RawRequest
should_retry_if=RetryIf, sleep_ms=500)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\util\retry.py", line 181, in
RetryOnException
exceptions.reraise(exc_info[1], tb=exc_info[2])
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\exceptions.py", line 146, in
reraise
six.reraise(type(exc_value), exc_value, tb)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\six\__init__.py", line 693, in reraise
raise value
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\util\retry.py", line 162, in
TryFunc
return func(*args, **kwargs), None
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\url_opener.py", line 80, in
urlopen
return opener.open(req, data, timeout)
File "C:\Program Files\Python37\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
File "C:\Program Files\Python37\lib\urllib\request.py", line 543, in _open
'_open', req)
File "C:\Program Files\Python37\lib\urllib\request.py", line 503, in
_call_chain
result = func(*args)
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\googlecloudsdk\core\url_opener.py", line 64, in
https_open
return self.do_open(build, req)
File "C:\Program Files\Python37\lib\urllib\request.py", line 1317, in
do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "C:\Program Files\Python37\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1275, in
_send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1224, in
endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Program Files\Python37\lib\http\client.py", line 1016, in
_send_output
self.send(msg)
File "C:\Program Files\Python37\lib\http\client.py", line 956, in send
self.connect()
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\httplib2\python3\httplib2\__init__.py",
line 1016, in connect
sock.connect((self.host, self.port))
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
434, in connect
self.__negotiatehttp(destpair[0], destpair[1])
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
380, in __negotiatehttp
headers += [self.__getauthheader(), "\r\n"]
File "dir\Google\Cloud
SDK\google-cloud-sdk\lib\third_party\socks\python3\socks\__init__.py", line
178, in __getauthheader
return "Proxy-Authorization: Basic " + base64.b64encode(auth)
File "C:\Program Files\Python37\lib\base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
On Fri, Nov 15, 2019 at 4:01 PM <buganizer-system@google.com> wrote:
na...@google.com <na...@google.com> #6
Hello,
I had been trying to reproduce your issue, and I was still not able. As such, I would like to ask you for more information in order to forward this information to the Cloud SDK team.
- Can you install python 2.7 and try again?
- Can you share with me the following information:
gcloud config set proxy/type PROXY_TYPE
gcloud config set proxy/port PROXY_PORT
I had been trying to reproduce your issue, and I was still not able. As such, I would like to ask you for more information in order to forward this information to the Cloud SDK team.
- Can you install python 2.7 and try again?
- Can you share with me the following information:
gcloud config set proxy/type PROXY_TYPE
gcloud config set proxy/port PROXY_PORT
co...@gmail.com <co...@gmail.com> #7
Hi,
1) I cannot install python 2.7 on my work computer so I am afraid I cannot perform this step
2) type - HTTP port - 8080
Thanks
1) I cannot install python 2.7 on my work computer so I am afraid I cannot perform this step
2) type - HTTP port - 8080
Thanks
na...@google.com <na...@google.com> #8
Hello,
Thank you for your information. Given the latest details I was able to reproduce your issue and I have forwarded the all the gathered information to the Cloud SDK team.
Keep in mind, that the Cloud SDK is still in Beta for Python 3.+
All further updates will be posted in this thread.
Thank you for your information. Given the latest details I was able to reproduce your issue and I have forwarded the all the gathered information to the Cloud SDK team.
Keep in mind, that the Cloud SDK is still in Beta for Python 3.+
All further updates will be posted in this thread.
Description
information in the report you file. In order to help diagnose the issue,
we've included some installation information in this report. Please look
through and redact any information you consider personal or sensitive
before submitting this issue.
Issue running command [gcloud info].
What steps will reproduce the problem?
Set up a proxy in python 3.x SDK using a port and a username with an @ symbol
What is the expected output? What do you see instead?
Expected to see a connection enabled through proxy. Instead, a type error is raised
Please provide any additional information below.
Trace:
gcloud_main.py:186
gcloud_cli.Execute()
calliope\cli.py:1009
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
calliope\cli.py:1042
exceptions.HandleError(exc, command_path_string, self.__known_error_handler)
calliope\exceptions.py:524
core_exceptions.reraise(exc)
core\exceptions.py:146
six.reraise(type(exc_value), exc_value, tb)
six\__init__.py:693
raise value
calliope\cli.py:983
resources = calliope_command.Run(cli=self, args=args)
calliope\backend.py:784
resources = command_instance.Run(args)
surface\info.py:78
_RunDiagnostics(args.ignore_hidden_property_whitelist)
surface\info.py:30
network_diagnostics.NetworkDiagnostic().RunChecks()
core\diagnostics\diagnostic_base.py:62
result, fixer = self._RunCheck(check)
core\diagnostics\diagnostic_base.py:97
result, fixer = check.Check(first_run=first_run)
core\diagnostics\network_diagnostics.py:92
fail = self._CheckURL(url)
core\diagnostics\network_diagnostics.py:110
http.Http().request(url, method='GET')
core\http.py:351
response = orig_request(*modified_args, **kwargs)
httplib2\python3\httplib2\__init__.py:1514
(response, content) = self._request(conn, authority, uri, request_uri, method, b...
httplib2\python3\httplib2\__init__.py:1263
(response, content) = self._conn_request(conn, request_uri, method, body, header...
httplib2\python3\httplib2\__init__.py:1186
conn.connect()
httplib2\python3\httplib2\__init__.py:1010
sock.connect((self.host, self.port))
socks\python3\socks\__init__.py:434
self.__negotiatehttp(destpair[0], destpair[1])
socks\python3\socks\__init__.py:380
headers += [self.__getauthheader(), "\r\n"]
socks\python3\socks\__init__.py:178
return "Proxy-Authorization: Basic " + base64.b64encode(auth)
base64.py:58
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not 'str'
Installation information:
Google Cloud SDK [265.0.0]
Platform: [Windows, x86_64] uname_result(system='Windows', node='E0445022', release='10', version='10.0.16299', machine='AMD64', processor='Intel64 Family 6 Model 142 Stepping 10, GenuineIntel')
Locale: ('en_GB', 'cp1252')
Python Version: [3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]]
Python Location: [C:\Program Files\Python37\python.exe]
Site Packages: [Disabled]
Installation Root: [${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk]
Installed Components:
beta: [2019.05.17]
bq: [2.0.48]
core: [2019.09.27]
gsutil: [4.43]
System PATH: [${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\sdk;${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\Enterprise Vault\EVClient\;c:\Program Files (x86)\Enterprise Vault\EVClient\x64\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program Files\nodejs\;c:\Program Files\Git\cmd;c:\Program Files (x86)\PuTTY\;${HOME}\AppData\Local\Microsoft\WindowsApps;${HOME}\AppData\Local\Programs\Microsoft VS Code\bin;C:\apache-maven-3.6.1\bin;${HOME}\.npm-packages;${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin;]
Python PATH: [${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\third_party;${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib;C:\Program Files\Python37\python37.zip;C:\Program Files\Python37\DLLs;C:\Program Files\Python37\lib;C:\Program Files\Python37]
Cloud SDK on PATH: [False]
Kubectl on PATH: [False]
Installation Properties: [${HOME}\AppData\Local\Google\Cloud SDK\google-cloud-sdk\properties]
User Config Directory: [${CLOUDSDK_CONFIG}]
Active Configuration Name: [work]
Active Configuration Path: [${CLOUDSDK_CONFIG}\configurations\config_work]
Account: [None]
Project: [None]
Current Properties:
[core]
disable_usage_reporting: [True]
[proxy]
address: [xxx]
port: [8080]
username: [c..m]
password: [PASSWORD]
type: [http]
Logs Directory: [${CLOUDSDK_CONFIG}\logs]
Last Log File: [${CLOUDSDK_CONFIG}\logs\2019.11.12\14.20.36.784338.log]
git: [b'git version 2.18.0.windows.1']
ssh: [NOT AVAILABLE]