Status Update
Comments
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #3
ap...@google.com <ap...@google.com> #4
Workaround for Fedora 35: Downgrade python 3 or add the following to .bashrc:
export CLOUDSDK_PYTHON=/usr/bin/python2
ap...@google.com <ap...@google.com> #6
ap...@google.com <ap...@google.com> #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):
ap...@google.com <ap...@google.com> #8
ap...@google.com <ap...@google.com> #9
au...@google.com <au...@google.com>
ap...@google.com <ap...@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.
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.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
ap...@google.com <ap...@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
ap...@google.com <ap...@google.com> #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'.
ap...@google.com <ap...@google.com> #15
Thanks. I can reproduce it. We will work on a fix.
ap...@google.com <ap...@google.com> #16
Version: 367.0.0
Python: 3.10
ap...@google.com <ap...@google.com> #17
I see another bug related to this and it says it fixed, is that true?
Thanks!
ap...@google.com <ap...@google.com> #18
vinwong@
ap...@google.com <ap...@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
ap...@google.com <ap...@google.com> #20
for now, running gcloud
without any parameters still throws an error.
ap...@google.com <ap...@google.com> #21
ap...@google.com <ap...@google.com> #22
vinwong@ we don't have full support for python 3.10 yet.
ap...@google.com <ap...@google.com> #23
ap...@google.com <ap...@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?
ap...@google.com <ap...@google.com> #25
ap...@google.com <ap...@google.com> #26
It should work fine with python 3.10.
ap...@google.com <ap...@google.com> #27
>gcloud set project my-project
ERROR: gcloud failed to load (gcloud.interactive): Problem loading gcloud.interactive: cannot import name 'Mapping' from 'collections'
ap...@google.com <ap...@google.com> #28
ap...@google.com <ap...@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
ap...@google.com <ap...@google.com> #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?
ap...@google.com <ap...@google.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'.
[...]
ap...@google.com <ap...@google.com> #32
ap...@google.com <ap...@google.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
ap...@google.com <ap...@google.com> #34
ap...@google.com <ap...@google.com> #35
Hello,
Thanks for your patience. Can you please provide us with some error trace logs?
ap...@google.com <ap...@google.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.
ap...@google.com <ap...@google.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?
za...@gmail.com <za...@gmail.com>
ap...@google.com <ap...@google.com> #38
as...@google.com <as...@google.com> #39
You can look at the patch file I provide with each update to determine whether or not the issue is fixed.
Description
Estimated workload: ~1 day per check
Technologies: Gradle, Metalava, API signature files
We have a number of API lint checks that are yet to be enabled. Some checks should be as simple as turning it on and whitelisting existing issues. Some checks will require improving the checks so it has less false positive results.