question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled depedency update: pyparsing(3.0.1)

See original GitHub issue

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

  • OS type and version: Linux
  • Python version: 3.7.4
  • pip version: 19.3
  • google-api-python-client==1.12.2

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!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
busunkim96commented, Oct 25, 2021

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.
1reaction
rdzotzcommented, Oct 25, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support pyparsing v3 (AttributeError downcaseTokens) #207
Unhandled depedency update: pyparsing(3.0.1) ... Old pip dependency resolver allowed installation of conflicting requirements.
Read more >
Google cloud platform app deploy failure due to pyparsing
I tried installing different versions of pyparsing to resolve the issue but none worked with all other dependencies. Are recent updates toΒ ...
Read more >
Bug #1951127 β€œBitrot with dependency pyparsing”
Pyparsing package was updated, need to change dependency version. Revision historyΒ ...
Read more >
pyparsing Β· PyPI
The pyparsing module provides a library of classes that client code uses to construct the grammar directly in Python code. [Since first writing...
Read more >
Python 3.10 update needs possible rebuild packages like ...
Just want to make a quick announcement that a new python package release was just pushed to Arch stable, and it's going from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found