Status Update
Comments
sh...@google.com <sh...@google.com> #2
Hello,
Thank you for reaching out.
The Product team is working on this issue. This request has no ETA, but you can follow the progress in this thread.
co...@gridcure.com <co...@gridcure.com> #3
th...@gmail.com <th...@gmail.com> #4
Workaround for Fedora 35: Downgrade python 3 or add the following to .bashrc:
export CLOUDSDK_PYTHON=/usr/bin/python2
al...@google.com <al...@google.com>
wi...@gmail.com <wi...@gmail.com> #6
vi...@rivile.lt <vi...@rivile.lt> #7
>gcloud
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import cli
from googlecloudsdk.calliope import actions
from googlecloudsdk.calliope import markdown
from googlecloudsdk.calliope import usage_text
from googlecloudsdk.calliope import parser_arguments
from googlecloudsdk.calliope import parser_completer
from googlecloudsdk.core.console import progress_tracker
class _BaseStagedProgressTracker(collections.Mapping):
wi...@gmail.com <wi...@gmail.com> #8
ir...@modmed.com <ir...@modmed.com> #9
co...@google.com <co...@google.com> #10
The fix is released with gcloud version 367.0.0 today. Please download latest gcloud version to work with Python 3.10.
vi...@rivile.lt <vi...@rivile.lt> #11
ba...@gmail.com <ba...@gmail.com> #12
for some reason running gcloud
on it's own still produces error (on Mac)
~ ❯ gcloud --version
Google Cloud SDK 367.0.0
beta 2021.12.10
bq 2.0.72
core 2021.12.10
gsutil 5.5
~ ❯ gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.events: module 'collections' has no attribute 'MutableMapping'.
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
co...@google.com <co...@google.com> #13
Hi i could not reproduce the issue. could you please try fresh download the latest gcloud?
$ export CLOUDSDK_PYTHON=/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
$ gcloud --version
Google Cloud SDK 367.0.0
bq 2.0.72
core 2021.12.10
gsutil 5.5
vi...@rivile.lt <vi...@rivile.lt> #14
>gcloud --version
Google Cloud SDK 367.0.0
beta 2021.12.10
bq 2.0.72
core 2021.12.10
gsutil 5.5
kubectl 1.20.8
>gcloud projects list
PROJECT_ID NAME PROJECT_NUMBER
xxxxxxxxxxxx XXXXXXXXXXXXX 1234556789
>gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.events: module 'collections' has no attribute 'MutableMapping'.
co...@google.com <co...@google.com> #15
Thanks. I can reproduce it. We will work on a fix.
so...@gmail.com <so...@gmail.com> #16
Version: 367.0.0
Python: 3.10
vi...@google.com <vi...@google.com> #17
I see another bug related to this and it says it fixed, is that true?
Thanks!
co...@google.com <co...@google.com> #18
vinwong@
vi...@google.com <vi...@google.com> #19
So, just want to verify one last thing, so is GCP SDK now fully support Python 3.10? I just want to make sure it is before I tell the customer, thanks!
Vincent
[Deleted User] <[Deleted User]> #20
for now, running gcloud
without any parameters still throws an error.
er...@everloved.com <er...@everloved.com> #21
co...@google.com <co...@google.com> #22
vinwong@ we don't have full support for python 3.10 yet.
vi...@google.com <vi...@google.com> #23
rt...@google.com <rt...@google.com> #24
Thanks for your patience. Our product team confirmed that the issue has been fixed. Can you please check from your end of everything is okay?
at...@mozilla.com <at...@mozilla.com> #25
rt...@google.com <rt...@google.com> #26
It should work fine with python 3.10.
vi...@rivile.lt <vi...@rivile.lt> #27
>gcloud set project my-project
ERROR: gcloud failed to load (gcloud.interactive): Problem loading gcloud.interactive: cannot import name 'Mapping' from 'collections'
ga...@pendo.io <ga...@pendo.io> #28
rt...@google.com <rt...@google.com> #29
After updating my SDK to the latest version, the issue got resolved. Can you please try reinstalling the SDK if it doesn't solve the issue?
This
The issue you described looks like a technical issue and for troubleshooting, it would be best for you to contact the
vi...@rivile.lt <vi...@rivile.lt> #30
Also, I don't understand what do you mean by first writing:
"This issue tracker is a channel for reporting issues..."
and then
"The issue you described looks like a technical issue..."
So technical issues are not issues?
be...@backboneiq.com <be...@backboneiq.com> #31
This issue is still not resolved in version 371.0.0. As others have noted, the issue only occurs for certain commands/command groups. We are particularly impacted by the gcloud app
command group being broken due to this issue (already noted above in
It is surprising and frustrating that this issue has not been treated with more urgency. Having a command group break may not seem significant given the full breadth of services gcloud
spans, but for some, a single broken command group means gcloud
is effectively completely broken, because the vast majority of their usage is within that command group. Additionally, there are now three open issues for this bug (
Version information and some failed commands are included below. Note that there are two different error messages, but both are caused by the same underlying issue.
> python -V
Python 3.10.2
> gcloud --version
Google Cloud SDK 371.0.0
alpha 2022.01.28
beta 2022.01.28
bq 2.0.73
cloud_sql_proxy 1.27.0
core 2022.01.28
gsutil 5.6
> gcloud
ERROR: (gcloud) Command name argument expected.
ERROR: gcloud failed to load (gcloud.interactive): Problem loading gcloud.interactive: cannot import name 'Mapping' from 'collections' (/Users/.../.pyenv/versions/3.10.2/lib/python3.10/collections/__init__.py).
[...]
> gcloud app
ERROR: (gcloud.app) Command name argument expected.
ERROR: gcloud crashed (CommandLoadFailure): Problem loading gcloud.app.deploy: module 'collections' has no attribute 'Mapping'.
[...]
4a...@sudoforge.com <4a...@sudoforge.com> #32
4a...@sudoforge.com <4a...@sudoforge.com> #33
Somewhat hilariously, 370.0.0
actually introduced the removal of a workaround to support the collections -> collections.abc
change for newer versions of Python.
➜ diff {369,370}/platform/bq/bigquery_client.py | head -10
--- 369/platform/bq/bigquery_client.py 1980-01-01 01:00:00.000000000 -0700
+++ 370/platform/bq/bigquery_client.py 1980-01-01 01:00:00.000000000 -0700
@@ -58,9 +58,6 @@
_GCS_SCHEME_PREFIX = 'gs://'
-collections_abc = collections
-if sys.version_info > (3, 8):
- collections_abc = collections.abc
4a...@sudoforge.com <4a...@sudoforge.com> #34
rt...@google.com <rt...@google.com> #35
Hello,
Thanks for your patience. Can you please provide us with some error trace logs?
4a...@sudoforge.com <4a...@sudoforge.com> #36
With each new release lacking a fix, I publish a patch file containing fixes for the errors that I'm able to find. I do not utilize each and every command, so I am not currently able to provide a stack trace containing usage of each of the methods that my patch fixes.
If you are for some reason unable to view the patch and correlate the patches to broken areas of the codebase, I'd be happy to write a script to invoke a matrice of each gcloud
subcommand with all of its flag variations. Requesting this seems... silly.
ir...@modmed.com <ir...@modmed.com> #37
In case I'm just "holding it wrong": do you have an "Enterprise Level" piece of software to handle the functions that your web interface doesn't do? (assuming your web interface is such "Enterprise Level piece of software" for the functions that it covers). Do you promote any 3rd party tool?
vi...@rivile.lt <vi...@rivile.lt> #38
4a...@sudoforge.com <4a...@sudoforge.com> #39
You can look at the patch file I provide with each update to determine whether or not the issue is fixed.
4a...@sudoforge.com <4a...@sudoforge.com> #40
Oh, I missed this thread.
As of 373.0.0, there are unresolved issues in 6 different files that require patching. Patch file attached; online link below:
rt...@google.com <rt...@google.com> #43
Hello,
Thanks for your patience. I've forwarded the information provided by you to our product team and they are reviewing the issue.
4a...@sudoforge.com <4a...@sudoforge.com> #45
I honestly can't believe the (lack of) response that this issue has received. Can we get an answer from a developer advocate or project manager as to why this issue has not been addressed over the past six months, and why this project does not target the latest mainline release of Python when many of its users' systems far supersede the officially supported versions?
sh...@google.com <sh...@google.com> #46
am...@google.com <am...@google.com> #47
Hello Everyone,
Thank you for your patience.
According to the product team, this issue has been fixed with the recent deployment of the Cloud SDK version 377.0.0. I'd recommend you to try upgrading your SDK to the mentioned version and checking if the issue was indeed fixed on your end and if not update us on this track.
That all being said, and since the issue has been marked as resolved internaly I will also mark this Bug Report as Fixed. Nevertheless if that is not the case for you please comment and this can be reopened.
ab...@google.com <ab...@google.com>
di...@google.com <di...@google.com> #49
Hi,
According to the product team the code that you are patching is not reachable by any gcloud command. There is no engineering work to be done and no gcloud command is not working because of the issues brought up in this issue tracker. If there is an actual command that is not working and you have any further information reproducing the issue please re-open this tracker. I am closing this tracker as of now as the issue has been fixed with the recent version of the Cloud SDK.
si...@workhouse.au <si...@workhouse.au> #50
ts...@gmail.com <ts...@gmail.com> #51
==> Running installer script 'google-cloud-sdk/install.sh'
Welcome to the Google Cloud CLI!
Beginning update. This process may take several minutes.
Your current Google Cloud CLI version is: 420.0.0
Installing components from version: 420.0.0
...
🍺 google-cloud-sdk was successfully installed!
➜ ~ gcloud
ERROR: gcloud failed to load: module 'collections' has no attribute 'Mapping'
gcloud_main = _import_gcloud_main()
File "/usr/local/google-cloud-sdk/lib/gcloud.py", line 56, in _import_gcloud_main
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 34, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 31, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/actions.py", line 29, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/markdown.py", line 28, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/usage_text.py", line 34, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/parser_arguments.py", line 29, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/calliope/parser_completer.py", line 26, in <module>
File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/console/progress_tracker.py", line 631, in <module>
^^^^^^^^^^^^^^^^^^^
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
/opt/homebrew/Caskroom/miniforge/base/bin/python3
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.
If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
➜ ~ which python
/opt/homebrew/Caskroom/miniforge/base/bin/python
➜ ~ python3.1
Python 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:26:40) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
Description
It would seem that you want to use "collections.abc.Mapping" instead of the never public "collections.Mapping".