Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'create_agent' is not defined #8639

Closed
MorenoLaQuatra opened this issue May 8, 2021 · 5 comments
Closed

NameError: name 'create_agent' is not defined #8639

MorenoLaQuatra opened this issue May 8, 2021 · 5 comments
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ux ✨ Anything preventing rasa open source developers moving forward quickly type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@MorenoLaQuatra
Copy link

Rasa version: 2.6.0

Rasa SDK version (if used & relevant): Not relevant

Rasa X version (if used & relevant): Not applicable

Python version: 3.7

Operating system (windows, osx, ...): Google Colab

Issue: When following the tutorial there is an error in the chat(model_path, endpoints) function. The error is related to the create_agent function that has not been correctly imported in jupyter.py. I solved by manually adding

from rasa.core.agent import Agent, create_agent in jupyter.py.

I also found this condition:

if typing.TYPE_CHECKING:
    from rasa.core.agent import Agent, create_agent

Is it necessary and above all, does it works as expected?

Error (including full traceback):

NameError: name 'create_agent' is not defined
@MorenoLaQuatra MorenoLaQuatra added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. labels May 8, 2021
@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @desmarchris will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@desmarchris
Copy link
Contributor

thanks for raising @MorenoLaQuatra, I'll work on a fix for this.

@hash-sha512
Copy link

if this is on the google colab environment, using rasa version 1.10.3, solved the "NameError: name "create_agent" is not defined" for me... should be a convenient workaround for now.

@MorenoLaQuatra
Copy link
Author

Thank you for pointing out the workaround.

This was referenced May 24, 2021
@TyDunn TyDunn added the area:rasa-oss/ux ✨ Anything preventing rasa open source developers moving forward quickly label Jun 9, 2021
@ancalita
Copy link
Member

ancalita commented Jul 1, 2021

@TyDunn this actually seems to have been fixed by this PR referenced above - is it safe to close this ticket?

@TyDunn TyDunn closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/ux ✨ Anything preventing rasa open source developers moving forward quickly type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

6 participants