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:
- Open the file
auth.pywith a text editor—I personally used the lightweightmousepad. The location ofauth.pyis given with the message error. In my case, it was located in the local packagehttplib2of python, that is,/home/lovedByJesus/.local/lib/python3.6/site-packages/httplib2/auth.py - Replace
pp.downcaseTokensbypp.pyparsing_common.downcase_tokens(I found this expression in line 20 belonging to the assignmentauth_param_name = token.copy().setName("auth-param-name").addParseAction(pp.downcaseTokens)) - Save the file and run
update-manager. It should run smoothly.