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.

importing `DefaultV1Recipe` leads to AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'

See original GitHub issue

On the main branch, importing this line of code in a try_this.py script file causes an error.

from rasa.engine.recipes.default_recipe import DefaultV1Recipe

This is the traceback.

Traceback (most recent call last):
  File "components/test_nlu_tok.py", line 7, in <module>
    from rasa.engine.recipes.default_recipe import DefaultV1Recipe
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/rasa/engine/recipes/default_recipe.py", line 24, in <module>
    from rasa.engine.constants import (
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/rasa/engine/constants.py", line 3, in <module>
    from rasa.core.channels import UserMessage
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/rasa/core/channels/__init__.py", line 26, in <module>
    from rasa.core.channels.hangouts import HangoutsInput  # noqa: F401
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/rasa/core/channels/hangouts.py", line 9, in <module>
    from oauth2client import client
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/oauth2client/client.py", line 39, in <module>
    from oauth2client import transport
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/oauth2client/transport.py", line 17, in <module>
    import httplib2
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/site-packages/httplib2/__init__.py", line 52, in <module>
    from . import auth
  File "/Users/vincent/Development/rasa-examples/venv/lib/python3.7/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'

Here’s the version info.

Rasa Version      :         2.8.12
Minimum Compatible Version: 2.8.9
Rasa SDK Version  :         2.8.2
Rasa X Version    :         None
Python Version    :         3.7.7
Operating System  :         Darwin-19.3.0-x86_64-i386-64bit
Python Path       :         /Users/vincent/Development/rasa-examples/venv/bin/python

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
jeanveaucommented, Oct 29, 2021

I have the same issue today when I tried to configure a new virtualenv

The issue is caused by some updates in last release of pyparsing (3.0.3), by limit the pyparsing version to 2.4.7, problem solved.

Think rasa need to update pyproject.toml file to fix this issue.

2reactions
marisbeautypalacecommented, Oct 31, 2021

Shalom guys, there is the following workaround/fix:

replace pp.downcaseTokens with pp.pyparsing_common.downcase_tokens in script auth.ph. That should run smoothly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'pyparsing' has no attribute 'downcaseTokens' rasa
I had the same issue when trying rasa train. The problem seems to be the later version of pyparsing module no longer has...
Read more >
module 'pyparsing' has no attribute 'downcaseTokens' rasa
I am facing a problem working with rasa, i can't run or train or do anything because below error.
Read more >
AttributeError 'pyparsing' on executing the update-manager
It seems that there has been changes in the module pyparsing where the attribute pp.downcaseTokens is now to be found under ...
Read more >
Error after downloading tensorflow-datasets in local machine.
After installing tensorflow-datasets via conda, importing previously installed ... AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'.
Read more >
pyparsing module — PyParsing 3.0.10 documentation
FollowedBy does not advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current...
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