-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin fails to initialize with AttributeError: module 'six.moves' has no attribute 'collections_abc' #67
Comments
Looking again at the traceback, I realised that the bug actually is not from here, but from the Google Python API Client. Someone else had the same problem, but with a different API just 3 days ago: googleapis/google-api-python-client#1039 But it has something to do with this plugin, because if I call ee.Initialize() in a standard Python console, the bug doesn't appear. This seems quite mysterious. |
Hi, If you have all GEE libraries working in your system try to delete all folders in the following directory and restart the Qgis:
|
Hi, |
then try to build the plugin by yourself, first uninstall the plugin, download the plugin code, run https://github.com/gee-community/qgis-earthengine-plugin#for-developers |
This could be a challenge for non-dev users @keepcool13 can you try uninstalling earthengine-api in your global Python environment and restart QGIS, this could be a conflict between EE versions and see what happens? |
This issue can be caused by an old six version. The module |
@SiggyF, six-1.15.0 is included with the plugin, for v0.0.2 and experimental v0.0.3, while the v0.0.1 uses six-1.13.0. So this must be something else, the conflicts are in the system Python installation |
Closing for no reply. This should work by now. |
I have installed the current version (0.0.2) of the plugin. When starting QGIS, I get a window that says:
Couldn't load plugin 'ee_plugin' due to an error when calling its classFactory() method
AttributeError: module 'six.moves' has no attribute 'collections_abc'
Traceback (most recent call last):
File "/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/init.py", line 25, in classFactory
from .ee_plugin import GoogleEarthEnginePlugin
File "/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/ee_plugin.py", line 26, in
ee_plugin.ee_auth.init()
File "/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/ee_auth.py", line 19, in init
ee.Initialize()
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/ee/init.py", line 123, in Initialize
http_transport=http_transport)
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/ee/data.py", line 210, in initialize
_install_cloud_api_resource()
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/ee/data.py", line 287, in _install_cloud_api_resource
http_transport=_http_transport)
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/ee/_cloud_api_utils.py", line 149, in build_cloud_resource
model=alt_model)
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/googleapiclient/discovery.py", line 288, in build
adc_key_path=adc_key_path,
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/Users/marius/Library/Python/3.7/lib/python/site-packages/googleapiclient/discovery.py", line 466, in build_from_document
if isinstance(client_options, six.moves.collections_abc.Mapping):
AttributeError: module 'six.moves' has no attribute 'collections_abc' `
Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)]
QGIS version: 3.12.2-București București, 8a1fb33634
Python Path:
/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python
/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS3.12.app/Contents/Resources/python
/Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7
/Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip
/Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages
/Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload
/Users/marius/Library/Python/3.7/lib/python/site-packages
/Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos
/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/marius/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/extlibs_darwin
I get the same error when typing
import ee
ee.Initialize()
in the QGIS Python console.
I authenticated the Python API in Terminal, similar to how asuhag did it here. In Terminal the API works fine. I use QGIS 3.12.2 and Python 3.7.3 on MacOS 10.15.6. I have updated six to the current version (1.15.0) and confirmed in the documentation that six does in fact have an attribute called collections_abc. What could be the cause of that error?
The text was updated successfully, but these errors were encountered: