My application has a feature that uses the google-api-python-client module. It bundles without any errors however when I open the application and attempt to use the google related feature, it throws several errors.
#!cmd
WARNING:googleapiclient.discovery_cache:file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
Traceback (most recent call last):
File "/Users/jcranney11/Documents/Projects/sapp/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery_cache/__init__.py", line 36, in autodetect
ModuleNotFoundError: No module named 'google.appengine'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery_cache/file_cache.py", line 33, in <module>
ModuleNotFoundError: No module named 'oauth2client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/App.app/Contents/Resources/lib/python3.6/googleapiclient/discovery_cache/file_cache.py", line 37, in <module>
ModuleNotFoundError: No module named 'oauth2client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery_cache/__init__.py", line 41, in autodetect
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery_cache/file_cache.py", line 41, in <module>
ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
INFO:googleapiclient.discovery:URL being requested: GET https://www.googleapis.com/discovery/v1/apis/compute/v1/rest
Exception in thread Thread-11:
Traceback (most recent call last):
File "threading.pyc", line 916, in _bootstrap_inner
File "threading.pyc", line 864, in run
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/app.py", line 211, in multi_thread_google
File "sneaker_suite.pyc", line 554, in create
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/_helpers.py", line 130, in positional_wrapper
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery.py", line 222, in build
File "/Users/jcranney11/Documents/Projects/app/flask-app/dist/app.app/Contents/Resources/lib/python3.6/googleapiclient/discovery.py", line 272, in _retrieve_discovery_doc
File "httplib2/__init__.pyc", line 1396, in request
File "httplib2/__init__.pyc", line 977, in __init__
File "httplib2/__init__.pyc", line 152, in _build_ssl_context
NotADirectoryError: [Errno 20] Not a directory
Original report by Joseph Cranney (Bitbucket: jcranney11, ).
My application has a feature that uses the google-api-python-client module. It bundles without any errors however when I open the application and attempt to use the google related feature, it throws several errors.
My setup.py looks like this:
I have tried adding these modules as an 'includes' option and as a 'packages' option, however still no luck.
How can I manually include these modules since py2app isn't doing it for me?