googleapis / google-api-python-client

🐍 The official Python client library for Google's discovery based APIs.
https://googleapis.github.io/google-api-python-client/docs/
Apache License 2.0
7.66k stars 2.39k forks source link

Unhandled depedency update: pyparsing(3.0.1) #1579

Closed abhishek1214 closed 2 years ago

abhishek1214 commented 2 years ago

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

Steps to reproduce

  1. Build app

Code example

  File "/usr/local/lib/python3.7/site-packages/httplib2/auth.py", line 20, in <module>
freelance_app |     auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
freelance_app | AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'

Stack trace

Traceback (most recent call last):
freelance_app |   File "./manage.py", line 21, in <module>
freelance_app |     main()
freelance_app |   File "./manage.py", line 17, in main
freelance_app |     execute_from_command_line(sys.argv)
freelance_app |   File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
freelance_app |     utility.execute()
freelance_app |   File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 377, in execute
freelance_app |     django.setup()
freelance_app |   File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
freelance_app |     apps.populate(settings.INSTALLED_APPS)
freelance_app |   File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 122, in populate
freelance_app |     app_config.ready()
freelance_app |   File "/app/integrations/freshchat/apps.py", line 11, in ready
freelance_app |     import integrations.freshchat.receivers
freelance_app |   File "/app/integrations/freshchat/receivers.py", line 14, in <module>
freelance_app |     from integrations.freshchat import tasks
freelance_app |   File "/app/integrations/freshchat/tasks.py", line 11, in <module>
freelance_app |     from integrations.freshchat import public
freelance_app |   File "/app/integrations/freshchat/public.py", line 11, in <module>
freelance_app |     from resources.meetings import services as meeting_services
freelance_app |   File "/app/resources/meetings/services.py", line 12, in <module>
freelance_app |     from integrations.google import public
freelance_app |   File "/app/integrations/google/public.py", line 1, in <module>
freelance_app |     from integrations.google import calendar_services
freelance_app |   File "/app/integrations/google/calendar_services.py", line 4, in <module>
freelance_app |     from googleapiclient.discovery import build
freelance_app |   File "/usr/local/lib/python3.7/site-packages/googleapiclient/discovery.py", line 48, in <module>
freelance_app |     import httplib2
freelance_app |   File "/usr/local/lib/python3.7/site-packages/httplib2/__init__.py", line 52, in <module>
freelance_app |     from . import auth
freelance_app |   File "/usr/local/lib/python3.7/site-packages/httplib2/auth.py", line 20, in <module>
freelance_app |     auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
freelance_app | AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'
freelance_app exited with code 1

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

rdzotz commented 2 years ago

I am still facing this issue after rebuilding my image this morning. I have tried everything aside from downgrading python from version: 3.7.9. Doing so now. Leaving this here for others ..

`

Name Version Build Channel

_libgcc_mutex 0.1 main
absl-py 0.15.0 pypi_0 pypi adal 1.2.7 pypi_0 pypi alembic 1.4.1 pypi_0 pypi applicationinsights 0.11.10 pypi_0 pypi astunparse 1.6.3 pypi_0 pypi attrs 21.2.0 pypi_0 pypi azure-common 1.1.27 pypi_0 pypi azure-core 1.19.0 pypi_0 pypi azure-graphrbac 0.61.1 pypi_0 pypi azure-identity 1.4.1 pypi_0 pypi azure-mgmt-authorization 0.61.0 pypi_0 pypi azure-mgmt-containerregistry 8.1.0 pypi_0 pypi azure-mgmt-core 1.3.0 pypi_0 pypi azure-mgmt-keyvault 9.2.0 pypi_0 pypi azure-mgmt-resource 13.0.0 pypi_0 pypi azure-mgmt-storage 11.2.0 pypi_0 pypi azureml-core 1.35.0 pypi_0 pypi azureml-dataprep 2.23.2 pypi_0 pypi azureml-dataprep-native 38.0.0 pypi_0 pypi azureml-dataprep-rslex 1.21.2 pypi_0 pypi azureml-dataset-runtime 1.35.0 pypi_0 pypi azureml-defaults 1.35.0 pypi_0 pypi azureml-inference-server-http 0.3.2 pypi_0 pypi azureml-telemetry 1.35.0 pypi_0 pypi azureml-train-core 1.35.0 pypi_0 pypi azureml-train-restclients-hyperdrive 1.35.0 pypi_0 pypi backports-tempfile 1.0 pypi_0 pypi backports-weakref 1.0.post1 pypi_0 pypi brotlipy 0.7.0 py37h27cfd23_1003
ca-certificates 2021.9.30 h06a4308_1
cached-property 1.5.2 pypi_0 pypi cachetools 4.2.4 pypi_0 pypi certifi 2021.10.8 py37h06a4308_0
cffi 1.14.3 py37h261ae71_2
chardet 3.0.4 py37h06a4308_1003
click 8.0.3 pypi_0 pypi cloudpickle 2.0.0 pypi_0 pypi cmake 3.18.2 pypi_0 pypi colorama 0.4.4 pypi_0 pypi conda 4.10.3 py37h06a4308_0
conda-package-handling 1.7.2 py37h03888b9_0
configparser 3.7.4 pypi_0 pypi contextlib2 21.6.0 pypi_0 pypi cryptography 3.2.1 py37h3c74f83_1
cycler 0.10.0 pypi_0 pypi cython 0.29.24 pypi_0 pypi databricks-cli 0.16.2 pypi_0 pypi dill 0.3.4 pypi_0 pypi distro 1.6.0 pypi_0 pypi dm-tree 0.1.6 pypi_0 pypi docker 5.0.3 pypi_0 pypi dotnetcore2 2.1.21 pypi_0 pypi entrypoints 0.3 pypi_0 pypi flask 2.0.2 pypi_0 pypi flatbuffers 1.12 pypi_0 pypi fusepy 3.0.1 pypi_0 pypi future 0.17.1 pypi_0 pypi gast 0.4.0 pypi_0 pypi gin-config 0.4.0 pypi_0 pypi gitdb 4.0.9 pypi_0 pypi gitpython 3.1.24 pypi_0 pypi google-api-core 1.31.3 pypi_0 pypi google-api-python-client 1.12.2 pypi_0 pypi google-auth 2.3.0 pypi_0 pypi google-auth-httplib2 0.1.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi googleapis-common-protos 1.53.0 pypi_0 pypi greenlet 1.1.2 pypi_0 pypi grpcio 1.34.1 pypi_0 pypi gunicorn 20.1.0 pypi_0 pypi h5py 3.1.0 pypi_0 pypi httplib2 0.20.1 pypi_0 pypi idna 2.10 py_0
importlib-metadata 4.8.1 pypi_0 pypi importlib-resources 5.3.0 pypi_0 pypi inference-schema 1.3.0 pypi_0 pypi intel-openmp 2018.0.3 pypi_0 pypi isodate 0.6.0 pypi_0 pypi itsdangerous 2.0.1 pypi_0 pypi jeepney 0.7.1 pypi_0 pypi jinja2 3.0.2 pypi_0 pypi jmespath 0.10.0 pypi_0 pypi joblib 1.1.0 pypi_0 pypi json-logging-py 0.2 pypi_0 pypi jsonpickle 2.0.0 pypi_0 pypi kaggle 1.5.12 pypi_0 pypi keras-nightly 2.5.0.dev2021032900 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi keras-tuner 1.0.2 pypi_0 pypi kiwisolver 1.3.2 pypi_0 pypi ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
mako 1.1.5 pypi_0 pypi markdown 3.3.4 pypi_0 pypi markupsafe 2.0.1 pypi_0 pypi matplotlib 3.3.4 pypi_0 pypi mkl 2018.0.3 pypi_0 pypi mlflow 1.16.0 pypi_0 pypi msal 1.15.0 pypi_0 pypi msal-extensions 0.2.2 pypi_0 pypi msrest 0.6.21 pypi_0 pypi msrestazure 0.6.4 pypi_0 pypi ncurses 6.2 he6710b0_1
ndg-httpsclient 0.5.1 pypi_0 pypi numpy 1.19.5 pypi_0 pypi oauth2client 4.1.3 pypi_0 pypi oauthlib 3.1.1 pypi_0 pypi opencensus 0.8.0 pypi_0 pypi opencensus-context 0.1.2 pypi_0 pypi opencensus-ext-azure 1.0.8 pypi_0 pypi opencv-python-headless 4.5.4.58 pypi_0 pypi openssl 1.1.1l h7f8727e_0
opt-einsum 3.3.0 pypi_0 pypi packaging 21.0 pypi_0 pypi pandas 1.3.4 pypi_0 pypi pathspec 0.9.0 pypi_0 pypi pillow 8.4.0 pypi_0 pypi pip 19.3.1 py37_0
portalocker 2.3.2 pypi_0 pypi prometheus-client 0.11.0 pypi_0 pypi prometheus-flask-exporter 0.18.4 pypi_0 pypi promise 2.3 pypi_0 pypi protobuf 3.19.0 pypi_0 pypi psutil 5.8.0 pypi_0 pypi py-cpuinfo 8.0.0 pypi_0 pypi pyarrow 3.0.0 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycocotools 2.0.2 pypi_0 pypi pycosat 0.6.3 py37h27cfd23_0
pycparser 2.20 py_2
pyjwt 2.3.0 pypi_0 pypi pyopenssl 19.1.0 pyhd3eb1b0_1
pyparsing 3.0.1 pypi_0 pypi pysocks 1.7.1 py37_1
python 3.7.9 h7579374_0
python-dateutil 2.8.2 pypi_0 pypi python-editor 1.0.4 pypi_0 pypi python-slugify 5.0.2 pypi_0 pypi pytz 2021.3 pypi_0 pypi pyyaml 6.0 pypi_0 pypi querystring-parser 1.2.4 pypi_0 pypi readline 8.0 h7b6447c_0
regex 2021.10.23 pypi_0 pypi requests 2.24.0 py_0
requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.7.2 pypi_0 pypi ruamel-yaml 0.17.4 pypi_0 pypi ruamel-yaml-clib 0.2.6 pypi_0 pypi ruamel_yaml 0.15.87 py37h7b6447c_1
sacrebleu 2.0.0 pypi_0 pypi scikit-learn 1.0.1 pypi_0 pypi scipy 1.7.1 pypi_0 pypi secretstorage 3.3.1 pypi_0 pypi sentencepiece 0.1.96 pypi_0 pypi seqeval 1.2.2 pypi_0 pypi setuptools 50.3.1 py37h06a4308_1
six 1.15.0 py37h06a4308_0
smmap 5.0.0 pypi_0 pypi sqlalchemy 1.4.26 pypi_0 pypi sqlite 3.33.0 h62c20be_0
sqlparse 0.4.2 pypi_0 pypi tabulate 0.8.9 pypi_0 pypi tensorboard 2.5.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.0 pypi_0 pypi tensorflow 2.5.0 pypi_0 pypi tensorflow-addons 0.14.0 pypi_0 pypi tensorflow-datasets 4.2.0 pypi_0 pypi tensorflow-estimator 2.5.0 pypi_0 pypi tensorflow-hub 0.12.0 pypi_0 pypi tensorflow-metadata 1.2.0 pypi_0 pypi tensorflow-model-optimization 0.7.0 pypi_0 pypi tensorflow-recommenders 0.5.1 pypi_0 pypi tensorflow-text 2.5.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi terminaltables 3.1.0 pypi_0 pypi text-unidecode 1.3 pypi_0 pypi tf-models-official 2.6.0 pypi_0 pypi tf-slim 1.1.0 pypi_0 pypi threadpoolctl 3.0.0 pypi_0 pypi tk 8.6.10 hbc83047_0
tqdm 4.51.0 pyhd3eb1b0_0
two-tower 1.1 pypi_0 pypi typeguard 2.13.0 pypi_0 pypi typing-extensions 3.7.4.3 pypi_0 pypi uritemplate 3.0.1 pypi_0 pypi urllib3 1.25.11 py_0
websocket-client 1.2.1 pypi_0 pypi werkzeug 1.0.1 pypi_0 pypi wheel 0.35.1 pyhd3eb1b0_0
wrapt 1.12.1 pypi_0 pypi xz 5.2.5 h7b6447c_0
yaml 0.2.5 h7b6447c_0
zipp 3.6.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3
2021-10-25 14:34:53.349921: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0

[2021-10-25T14:34:54.004026] The experiment failed. Finalizing run... 2021/10/25 14:34:54 Not exporting to RunHistory as the exporter is either stopped or there is no data. Stopped: false OriginalData: 1 FilteredData: 0. Cleaning up all outstanding Run operations, waiting 900.0 seconds 1 items cleaning up... Cleanup took 0.10444402694702148 seconds Traceback (most recent call last): File "train.py", line 16, in import tensorflow as tf File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/init.py", line 41, in from tensorflow.python.tools import module_util as _module_util File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/init.py", line 48, in from tensorflow.python import keras File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/init.py", line 25, in from tensorflow.python.keras import models File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/models.py", line 20, in from tensorflow.python.keras import metrics as metrics_module File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/metrics.py", line 37, in from tensorflow.python.keras import activations File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/activations.py", line 18, in from tensorflow.python.keras.layers import advanced_activations File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/layers/init.py", line 22, in from tensorflow.python.keras.engine.input_layer import Input File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/engine/input_layer.py", line 24, in from tensorflow.python.keras.engine import base_layer File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer.py", line 49, in from tensorflow.python.keras.engine import base_layer_utils File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer_utils.py", line 31, in from tensorflow.python.keras.utils import tf_utils File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/keras/utils/tf_utils.py", line 22, in from tensorflow.python.distribute.coordinator import cluster_coordinator as coordinator_lib File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/distribute/coordinator/cluster_coordinator.py", line 36, in from tensorflow.python.distribute import parameter_server_strategy_v2 File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/distribute/parameter_server_strategy_v2.py", line 33, in from tensorflow.python.distribute import parameter_server_strategy File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/distribute/parameter_server_strategy.py", line 34, in from tensorflow.python.distribute.cluster_resolver import SimpleClusterResolver File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/distribute/cluster_resolver/init.py", line 31, in from tensorflow.python.distribute.cluster_resolver.gce_cluster_resolver import GCEClusterResolver File "/opt/miniconda/lib/python3.7/site-packages/tensorflow/python/distribute/cluster_resolver/gce_cluster_resolver.py", line 28, in from googleapiclient import discovery # pylint: disable=g-import-not-at-top File "/opt/miniconda/lib/python3.7/site-packages/googleapiclient/discovery.py", line 48, in import httplib2 File "/opt/miniconda/lib/python3.7/site-packages/httplib2/init.py", line 52, in from . import auth File "/opt/miniconda/lib/python3.7/site-packages/httplib2/auth.py", line 20, in auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens) AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'`

busunkim96 commented 2 years ago

Hi,

It looks like pyparsing is used by httplib2. It appears httplib2 is compatible with pyparsing>=2.4.2, <3. Can you try downgrading your version of pyparsing to 2.4.7?

https://github.com/httplib2/httplib2/search?q=pyparsing https://pypi.org/project/pyparsing/#history

hamza-shafiq commented 2 years ago

Hi,

I am still facing this issue. I have tried multiple times by adjusting the compatible versions of different packages. Yes I have tried with version pyparsing==2.4.7 as well. No luck. Still getting the same error:

auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'
rdzotz commented 2 years ago

Hi,

It looks like pyparsing is used by httplib2. It appears pyparsing is compatible with pyarsing>=2.4.2, <3. Can you try downgrading your version of pyparsing to 2.4.7?

https://github.com/httplib2/httplib2/search?q=pyparsing https://pypi.org/project/pyparsing/#history

Fixed the issue for me.

Currently checking to confirm if pinned google-api-python-client==1.12.2 is indeed required

busunkim96 commented 2 years ago

To be explicit, if you're experiencing this issue, you've likely wound up with pyparsing>=3.0.0, which is not compatible with httplib2 (see https://github.com/httplib2/httplib2/issues/207).

The solution is to install the last version of pyparsing that is compatible, pyparsing==2.4.7


@hamza-shafiq Can you share the output of pip freeze?

@rdzotz Yep we definitely recommend pinning dependencies for build reproducibility. Please also review the 2.0.0 Migration Guide and move to a 2.x version when you are able to. There is a reliability improvement made in the 2.x version.

FWIW I tried installing google-api-python-client in a fresh virtualenv and it picks up the correct version of pyparsing (2.4.7) automatically.

(env) busunkim@busunkim:~/bugs/httplib2-pyparsing$ pip install google-api-python-client
Collecting google-api-python-client
  Downloading google_api_python_client-2.27.0-py2.py3-none-any.whl (7.7 MB)
     |████████████████████████████████| 7.7 MB 8.1 MB/s 
Collecting google-api-core<3.0.0dev,>=1.21.0
  Using cached google_api_core-2.1.1-py2.py3-none-any.whl (95 kB)
Collecting uritemplate<5,>=3.0.0
  Downloading uritemplate-4.1.1-py2.py3-none-any.whl (10 kB)
Collecting google-auth-httplib2>=0.1.0
  Using cached google_auth_httplib2-0.1.0-py2.py3-none-any.whl (9.3 kB)
Collecting httplib2<1dev,>=0.15.0
  Using cached httplib2-0.20.1-py3-none-any.whl (96 kB)
Collecting google-auth<3.0.0dev,>=1.16.0
  Downloading google_auth-2.3.1-py2.py3-none-any.whl (154 kB)
     |████████████████████████████████| 154 kB 76.2 MB/s 
Requirement already satisfied: setuptools>=40.3.0 in ./env/lib/python3.9/site-packages (from google-api-core<3.0.0dev,>=1.21.0->google-api-python-client) (56.0.0)
Collecting googleapis-common-protos<2.0dev,>=1.6.0
  Using cached googleapis_common_protos-1.53.0-py2.py3-none-any.whl (198 kB)
Collecting protobuf>=3.12.0
  Downloading protobuf-3.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 43.6 MB/s 
Collecting requests<3.0.0dev,>=2.18.0
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting six>=1.9.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting rsa<5,>=3.1.4
  Using cached rsa-4.7.2-py3-none-any.whl (34 kB)
Collecting cachetools<5.0,>=2.0.0
  Using cached cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting pyparsing<3,>=2.4.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Installing collected packages: pyasn1, urllib3, six, rsa, pyparsing, pyasn1-modules, protobuf, idna, charset-normalizer, certifi, cachetools, requests, httplib2, googleapis-common-protos, google-auth, uritemplate, google-auth-httplib2, google-api-core, google-api-python-client
Successfully installed cachetools-4.2.4 certifi-2021.10.8 charset-normalizer-2.0.7 google-api-core-2.1.1 google-api-python-client-2.27.0 google-auth-2.3.1 google-auth-httplib2-0.1.0 googleapis-common-protos-1.53.0 httplib2-0.20.1 idna-3.3 protobuf-3.19.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-2.4.7 requests-2.26.0 rsa-4.7.2 six-1.16.0 uritemplate-4.1.1 urllib3-1.26.7
WARNING: You are using pip version 21.1.1; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/google/home/busunkim/bugs/httplib2-pyparsing/env/bin/python3 -m pip install --upgrade pip' command.
busunkim96 commented 2 years ago

Another note, updating to the latest pip should help as it doesn't allow incompatible versions to be installed: https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020

hamza-shafiq commented 2 years ago

@busunkim96 here is the output of pip freeze

africastalking==1.2.3 aiohttp==3.7.4.post0 appdirs==1.4.4 arabic-reshaper==2.1.3 async-timeout==3.0.1 attrs==21.2.0 cachetools==4.2.2 certifi==2021.5.30 cffi==1.14.6 chardet==4.0.0 charset-normalizer==2.0.5 click==8.0.1 clikit==0.6.2 contextlib2==21.6.0 convertdate==2.3.2 coreapi==2.3.3 coreschema==0.0.4 crashtest==0.3.1 cryptography==3.4.8 cycler==0.10.0 Cython==0.29.24 decorator==5.1.0 Deprecated==1.2.13 dj-database-url==0.5.0 Django==2.2.5 django-discover-runner==1.0 django-extensions==2.2.1 django-filter==2.4.0 django-gcloud-storage==0.4.0 django-role-permissions==3.1.1 django-storages==1.11.1 djangorestframework==3.12.4 docusign-esign==3.1.0 ecdsa==0.14.1 feedparser==6.0.8 flake8==3.9.2 fsspec==2021.8.1 future==0.18.2 gcloud==0.18.3 gcsfs==2021.8.1 geocoder==1.38.1 geographiclib==1.52 geopy==2.2.0 geotext==0.4.0 google-api-core==1.31.3 google-api-python-client==1.12.2 google-auth==1.35.0 google-auth-httplib2==0.1.0 google-auth-oauthlib==0.4.6 google-cloud-core==1.6.0 google-cloud-datastore==1.13.2 google-cloud-storage==1.42.3 google-crc32c==1.1.2 google-resumable-media==2.0.2 googleapis-common-protos==1.53.0 googledatastore==7.0.2 googlemaps==3.1.3 grpcio==1.41.0 gunicorn==19.9.0 haversine==2.3.0 holidays==0.9.12 html5lib==1.1 httplib2==0.20.1 httpstan==4.5.0 hubspot-api-client==3.7.2 idna==3.2 importlib-metadata==4.8.1 inflection==0.5.1 itypes==1.2.0 Jinja2==3.0.1 jwcrypto==1.0 kiwisolver==1.3.2 lunardate==0.2.0 lz4==3.1.3 MarkupSafe==2.0.1 marshmallow==3.13.0 matplotlib==3.4.3 mccabe==0.6.1 more-itertools==8.9.0 multidict==5.1.0 nose==1.3.7 numpy==1.21.2 oauth2client==3.0.0 oauthlib==3.1.1 packaging==21.0 pandas==0.25.1 pastel==0.2.1 Pillow==8.3.2 proto-google-cloud-datastore-v1==0.90.4 protobuf==3.17.3 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycodestyle==2.7.0 pycparser==2.20 pycrypto==2.6.1 pyfcm==1.5.4 pyflakes==2.3.1 PyJWT==1.7.1 pyjwt-rsa==0.3.9 pylev==1.4.0 PyMeeus==0.5.11 pymemcache==3.5.0 pyparsing==2.4.7 PyPDF2==1.26.0 Pyrebase==3.0.18 pysimdjson==3.2.0 pystan==3.2.0 python-bidi==0.4.2 python-dateutil==2.8.2 python-dotenv==0.19.0 python-http-client==3.3.2 python-jose==3.2.0 python-jwt==3.3.0 python-memcached==1.59 pytz==2019.2 Quandl==3.6.1 ratelim==0.1.6 redis==3.5.3 reportlab==3.6.1 requests==2.26.0 requests-oauthlib==1.3.0 requests-toolbelt==0.9.1 rsa==4.7.2 schema==0.7.4 sendgrid==6.8.1 setuptools-git==1.2 sgmllib3k==1.0.0 six==1.16.0 slackclient==2.9.3 sqlparse==0.3.0 sseclient==0.0.27 starkbank-ecdsa==1.1.1 stripe==2.55.0 twilio==6.63.2 typing-extensions==3.10.0.2 Unidecode==1.3.1 uritemplate==3.0.1 urllib3==1.26.6 vincenty==0.1.4 webargs==7.0.1 webencodings==0.5.1 Werkzeug==2.0.1 whitenoise==4.1.3 wrapt==1.12.1 xhtml2pdf==0.2.5 xlrd==2.0.1 xmltodict==0.12.0 yarl==1.6.3 zipp==3.5.0

rdzotz commented 2 years ago

The following worked for me (i.e. without pinning google-api-python-client)

pyparsing==2.4.7

_libgcc_mutex 0.1 main
absl-py 0.15.0 pypi_0 pypi adal 1.2.7 pypi_0 pypi alembic 1.4.1 pypi_0 pypi applicationinsights 0.11.10 pypi_0 pypi astunparse 1.6.3 pypi_0 pypi attrs 21.2.0 pypi_0 pypi azure-common 1.1.27 pypi_0 pypi azure-core 1.19.0 pypi_0 pypi azure-graphrbac 0.61.1 pypi_0 pypi azure-identity 1.4.1 pypi_0 pypi azure-mgmt-authorization 0.61.0 pypi_0 pypi azure-mgmt-containerregistry 8.1.0 pypi_0 pypi azure-mgmt-core 1.3.0 pypi_0 pypi azure-mgmt-keyvault 9.2.0 pypi_0 pypi azure-mgmt-resource 13.0.0 pypi_0 pypi azure-mgmt-storage 11.2.0 pypi_0 pypi azureml-core 1.35.0 pypi_0 pypi azureml-dataprep 2.23.2 pypi_0 pypi azureml-dataprep-native 38.0.0 pypi_0 pypi azureml-dataprep-rslex 1.21.2 pypi_0 pypi azureml-dataset-runtime 1.35.0 pypi_0 pypi azureml-defaults 1.35.0 pypi_0 pypi azureml-inference-server-http 0.3.2 pypi_0 pypi azureml-telemetry 1.35.0 pypi_0 pypi azureml-train-core 1.35.0 pypi_0 pypi azureml-train-restclients-hyperdrive 1.35.0 pypi_0 pypi backports-tempfile 1.0 pypi_0 pypi backports-weakref 1.0.post1 pypi_0 pypi brotlipy 0.7.0 py37h27cfd23_1003
ca-certificates 2021.9.30 h06a4308_1
cached-property 1.5.2 pypi_0 pypi cachetools 4.2.4 pypi_0 pypi certifi 2021.10.8 py37h06a4308_0
cffi 1.14.3 py37h261ae71_2
chardet 3.0.4 py37h06a4308_1003
click 8.0.3 pypi_0 pypi cloudpickle 2.0.0 pypi_0 pypi cmake 3.18.2 pypi_0 pypi colorama 0.4.4 pypi_0 pypi conda 4.10.3 py37h06a4308_0
conda-package-handling 1.7.2 py37h03888b9_0
configparser 3.7.4 pypi_0 pypi contextlib2 21.6.0 pypi_0 pypi cryptography 3.2.1 py37h3c74f83_1
cycler 0.10.0 pypi_0 pypi cython 0.29.24 pypi_0 pypi databricks-cli 0.16.2 pypi_0 pypi dill 0.3.4 pypi_0 pypi distro 1.6.0 pypi_0 pypi dm-tree 0.1.6 pypi_0 pypi docker 5.0.3 pypi_0 pypi dotnetcore2 2.1.21 pypi_0 pypi entrypoints 0.3 pypi_0 pypi flask 2.0.2 pypi_0 pypi flatbuffers 1.12 pypi_0 pypi fusepy 3.0.1 pypi_0 pypi future 0.17.1 pypi_0 pypi gast 0.4.0 pypi_0 pypi gin-config 0.4.0 pypi_0 pypi gitdb 4.0.9 pypi_0 pypi gitpython 3.1.24 pypi_0 pypi google-api-core 2.1.1 pypi_0 pypi google-api-python-client 2.27.0 pypi_0 pypi google-auth 1.35.0 pypi_0 pypi google-auth-httplib2 0.1.0 pypi_0 pypi google-auth-oauthlib 0.4.6 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi googleapis-common-protos 1.53.0 pypi_0 pypi greenlet 1.1.2 pypi_0 pypi grpcio 1.34.1 pypi_0 pypi gunicorn 20.1.0 pypi_0 pypi h5py 3.1.0 pypi_0 pypi httplib2 0.20.1 pypi_0 pypi idna 2.10 py_0
importlib-metadata 4.8.1 pypi_0 pypi importlib-resources 5.3.0 pypi_0 pypi inference-schema 1.3.0 pypi_0 pypi intel-openmp 2018.0.3 pypi_0 pypi isodate 0.6.0 pypi_0 pypi itsdangerous 2.0.1 pypi_0 pypi jeepney 0.7.1 pypi_0 pypi jinja2 3.0.2 pypi_0 pypi jmespath 0.10.0 pypi_0 pypi joblib 1.1.0 pypi_0 pypi json-logging-py 0.2 pypi_0 pypi jsonpickle 2.0.0 pypi_0 pypi kaggle 1.5.12 pypi_0 pypi keras-nightly 2.5.0.dev2021032900 pypi_0 pypi keras-preprocessing 1.1.2 pypi_0 pypi keras-tuner 1.0.2 pypi_0 pypi kiwisolver 1.3.2 pypi_0 pypi ld_impl_linux-64 2.33.1 h53a641e_7
libedit 3.1.20191231 h14c3975_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
mako 1.1.5 pypi_0 pypi markdown 3.3.4 pypi_0 pypi markupsafe 2.0.1 pypi_0 pypi matplotlib 3.3.4 pypi_0 pypi mkl 2018.0.3 pypi_0 pypi mlflow 1.16.0 pypi_0 pypi msal 1.15.0 pypi_0 pypi msal-extensions 0.2.2 pypi_0 pypi msrest 0.6.21 pypi_0 pypi msrestazure 0.6.4 pypi_0 pypi ncurses 6.2 he6710b0_1
ndg-httpsclient 0.5.1 pypi_0 pypi numpy 1.19.5 pypi_0 pypi oauth2client 4.1.3 pypi_0 pypi oauthlib 3.1.1 pypi_0 pypi opencensus 0.8.0 pypi_0 pypi opencensus-context 0.1.2 pypi_0 pypi opencensus-ext-azure 1.0.8 pypi_0 pypi opencv-python-headless 4.5.4.58 pypi_0 pypi openssl 1.1.1l h7f8727e_0
opt-einsum 3.3.0 pypi_0 pypi packaging 21.0 pypi_0 pypi pandas 1.3.4 pypi_0 pypi pathspec 0.9.0 pypi_0 pypi pillow 8.4.0 pypi_0 pypi pip 19.3.1 py37_0
portalocker 2.3.2 pypi_0 pypi prometheus-client 0.11.0 pypi_0 pypi prometheus-flask-exporter 0.18.4 pypi_0 pypi promise 2.3 pypi_0 pypi protobuf 3.19.0 pypi_0 pypi psutil 5.8.0 pypi_0 pypi py-cpuinfo 8.0.0 pypi_0 pypi pyarrow 3.0.0 pypi_0 pypi pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pycocotools 2.0.2 pypi_0 pypi pycosat 0.6.3 py37h27cfd23_0
pycparser 2.20 py_2
pyjwt 2.3.0 pypi_0 pypi pyopenssl 19.1.0 pyhd3eb1b0_1
pyparsing 2.4.7 pypi_0 pypi pysocks 1.7.1 py37_1
python 3.7.9 h7579374_0
python-dateutil 2.8.2 pypi_0 pypi python-editor 1.0.4 pypi_0 pypi python-slugify 5.0.2 pypi_0 pypi pytz 2021.3 pypi_0 pypi pyyaml 6.0 pypi_0 pypi querystring-parser 1.2.4 pypi_0 pypi readline 8.0 h7b6447c_0
regex 2021.10.23 pypi_0 pypi requests 2.24.0 py_0
requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.7.2 pypi_0 pypi ruamel-yaml 0.17.4 pypi_0 pypi ruamel-yaml-clib 0.2.6 pypi_0 pypi ruamel_yaml 0.15.87 py37h7b6447c_1
sacrebleu 2.0.0 pypi_0 pypi scikit-learn 1.0.1 pypi_0 pypi scipy 1.7.1 pypi_0 pypi secretstorage 3.3.1 pypi_0 pypi sentencepiece 0.1.96 pypi_0 pypi seqeval 1.2.2 pypi_0 pypi setuptools 50.3.1 py37h06a4308_1
six 1.15.0 py37h06a4308_0
smmap 5.0.0 pypi_0 pypi sqlalchemy 1.4.26 pypi_0 pypi sqlite 3.33.0 h62c20be_0
sqlparse 0.4.2 pypi_0 pypi tabulate 0.8.9 pypi_0 pypi tensorboard 2.5.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.0 pypi_0 pypi tensorflow 2.5.0 pypi_0 pypi tensorflow-addons 0.14.0 pypi_0 pypi tensorflow-datasets 4.2.0 pypi_0 pypi tensorflow-estimator 2.5.0 pypi_0 pypi tensorflow-hub 0.12.0 pypi_0 pypi tensorflow-metadata 1.2.0 pypi_0 pypi tensorflow-model-optimization 0.7.0 pypi_0 pypi tensorflow-recommenders 0.5.1 pypi_0 pypi tensorflow-text 2.5.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi terminaltables 3.1.0 pypi_0 pypi text-unidecode 1.3 pypi_0 pypi tf-models-official 2.6.0 pypi_0 pypi tf-slim 1.1.0 pypi_0 pypi threadpoolctl 3.0.0 pypi_0 pypi tk 8.6.10 hbc83047_0
tqdm 4.51.0 pyhd3eb1b0_0
two-tower 1.1 pypi_0 pypi typeguard 2.13.0 pypi_0 pypi typing-extensions 3.7.4.3 pypi_0 pypi uritemplate 4.1.1 pypi_0 pypi urllib3 1.25.11 py_0
websocket-client 1.2.1 pypi_0 pypi werkzeug 1.0.1 pypi_0 pypi wheel 0.35.1 pyhd3eb1b0_0
wrapt 1.12.1 pypi_0 pypi xz 5.2.5 h7b6447c_0
yaml 0.2.5 h7b6447c_0
zipp 3.6.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3

hamza-shafiq commented 2 years ago

Still facing same error. I am just adding some extra stack-trace for better understanding. Please assist me on this.

File "/home/vmagent/app/utils/helper_functions.py", line 13, in <module>
    from pyrebase import pyrebase
  File "/env/lib/python3.6/site-packages/pyrebase/__init__.py", line 1, in <module>
    from .pyrebase import initialize_app
  File "/env/lib/python3.6/site-packages/pyrebase/pyrebase.py", line 17, in <module>
    from oauth2client.service_account import ServiceAccountCredentials
  File "/env/lib/python3.6/site-packages/oauth2client/service_account.py", line 25, in <module>
    from oauth2client import client
  File "/env/lib/python3.6/site-packages/oauth2client/client.py", line 38, in <module>
    from oauth2client import transport
  File "/env/lib/python3.6/site-packages/oauth2client/transport.py", line 17, in <module>
    import httplib2
  File "/env/lib/python3.6/site-packages/httplib2/__init__.py", line 52, in <module>
    from . import auth
  File "/env/lib/python3.6/site-packages/httplib2/auth.py", line 20, in <module>
    auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)
AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'
busunkim96 commented 2 years ago

@hamza-shafiq Hmm pyparsing==2.4.7 definitely has that function.

Is it possible you're using a different version? You can check the version of pyparsing used at runtime by doing this:

busunkim@busunkim:~/github/google-auth-library-python$ python3
Python 3.9.7 (default, Sep  3 2021, 06:18:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyparsing
>>> pyparsing.__version__
'2.4.7'
busunkim96 commented 2 years ago

httplib2 has released a new version that is compatible with pyparsing v3. https://github.com/httplib2/httplib2/issues/207 Please install httplib2>=0.20.2.