AttributeError 'pyparsing' on executing the update-manager

My update-manager in Ubuntu 18.04. had been working fine, until it suddenly showed an error:

AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'

How can I bring my Update Manager to work again?

1 Answer

It seems that there has been changes in the module pyparsing where the attribute pp.downcaseTokens is now to be found under pp.pyparsing_common.downcase_tokens (See discussion in GitHub AttributeError: module 'pyparsing' has no attribute 'downcaseTokens' #207)

So the quick fix is following:

  1. Open the file auth.py with a text editor—I personally used the lightweight mousepad. The location of auth.py is given with the message error. In my case, it was located in the local package httplib2 of python, that is, /home/lovedByJesus/.local/lib/python3.6/site-packages/httplib2/auth.py
  2. Replace pp.downcaseTokens by pp.pyparsing_common.downcase_tokens (I found this expression in line 20 belonging to the assignment auth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens))
  3. Save the file and run update-manager. It should run smoothly.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like