You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any service using an older release of six will encounter this ImportError:
Traceback (most recent call last):
. . .
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/main.py", line 16, in <module>
from google.cloud import ndb
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/ndb/__init__.py", line 28, in <module>
from google.cloud.ndb.client import Client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/ndb/client.py", line 26, in <module>
from google.cloud.datastore_v1.gapic import datastore_client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore_v1/__init__.py", line 18, in <module>
from google.cloud.datastore_v1.gapic import datastore_client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore_v1/gapic/datastore_client.py", line 39, in <module>
from google.cloud.datastore.version import __version__
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/__init__.py", line 60, in <module>
from google.cloud.datastore.client import Client
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/client.py", line 26, in <module>
from google.cloud.datastore._http import HTTPDatastoreAPI
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/datastore/_http.py", line 19, in <module>
from google.cloud import _http as connection_module
File "/base/data/home/apps/m~PROJECT_ID/20201117t171012.431016593202024462/lib/google/cloud/_http.py", line 22, in <module>
from six.moves import collections_abc
ImportError: cannot import name collections_abc
The current workaround is to reference the immediately preceding version by adding google-cloud-core==1.4.1 in any affected application's requirements.txt file until either App Engine revs six to a newer release (>=1.13.0), orLine 22 of google/cloud/_http.py is patched, perhaps with something like this:
# catch six<1.13.0
try:
from six.moves import collections_abc
except ImportError:
# catch python<3.3.0
try:
import collections.abc as collections_abc # only works on 3.3+
except ImportError:
import collections as collections_abc
The text was updated successfully, but these errors were encountered:
wescpy
added a commit
to googlecodelabs/migrate-python2-appengine
that referenced
this issue
Nov 18, 2020
six>=1.13.0
and is in releases 1.4.2 & newer.six
will encounter thisImportError
:six==1.12.0
is built-ingoogle-cloud-core==1.4.1
in any affected application'srequirements.txt
file until either App Engine revssix
to a newer release (>=1.13.0), or Line 22 of google/cloud/_http.py is patched, perhaps with something like this:The text was updated successfully, but these errors were encountered: