Score:0

AttributeError 'pyparsing' on executing the update-manager

az flag

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?

Score:0
az flag

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.
Score:0
bj flag

Instead of modifying the expression containing "pp.downcaseTokens" found in one of the Python site-packages files, I just ran:

pip install 'httplib2>=0.20.2'

as suggested by one of the answers found here.

This worked for me on Ubuntu 22.04.

loved.by.Jesus avatar
az flag
Thanks for alternative answer in Ubuntu 22.04. Take heed that I asked for Ubuntu 18.04., and it works with python3.6 as distro version, but in Ubuntu 22.04 you got python3.10 see [chat](https://www.reddit.com/r/Ubuntu/comments/sehecb/will_2204_lts_ship_with_python_310/)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.