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

Lock store endpoint_config has no attribute 'type' #6031

Closed
tatianafrank opened this issue Jun 16, 2020 · 5 comments · Fixed by #6094
Closed

Lock store endpoint_config has no attribute 'type' #6031

tatianafrank opened this issue Jun 16, 2020 · 5 comments · Fixed by #6094
Labels
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.

Comments

@tatianafrank
Copy link

tatianafrank commented Jun 16, 2020

Rasa version:1.9.5

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant): 0.27.4

Python version: rasa x docker image

Operating system (windows, osx, ...): rasa x docker image

Issue:
This line https://github.com/RasaHQ/rasa/blob/master/rasa/core/lock_store.py#L250 should be lock_store = _load_from_module_string(endpoint_config)
endpoint_config is a string so it has no attribute type and fails with this error:

Error (including full traceback):

2020-06-16 14:03:23 INFO     root  - Starting Rasa server on http://localhost:5005
2020-06-16 14:03:24.004532: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
Experienced exception while trying to serve
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 261, in _load_from_module_string
    lock_store_class = common.class_from_module_path(endpoint_config.type)
AttributeError: 'str' object has no attribute 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/sanic/app.py", line 1167, in run
    serve(**server_settings)
  File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 892, in serve
    trigger_events(before_start, loop)
  File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 668, in trigger_events
    loop.run_until_complete(result)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/run.py", line 245, in load_agent_on_start
    _lock_store = LockStore.create(endpoints.lock_store)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 38, in create
    return _create_from_endpoint_config(obj)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 250, in _create_from_endpoint_config
    lock_store = _load_from_module_string(endpoint_config.type)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 265, in _load_from_module_string
    f"Could not find a class based on the module path "
AttributeError: 'str' object has no attribute 'type'
Traceback (most recent call last):
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 261, in _load_from_module_string
    lock_store_class = common.class_from_module_path(endpoint_config.type)
AttributeError: 'str' object has no attribute 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/venv/bin/rasa", line 8, in <module>
    sys.exit(main())
  File "/opt/venv/lib/python3.7/site-packages/rasa/__main__.py", line 91, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/opt/venv/lib/python3.7/site-packages/rasa/cli/run.py", line 114, in run
    rasa.run(**vars(args))
  File "/opt/venv/lib/python3.7/site-packages/rasa/run.py", line 56, in run
    **kwargs,
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/run.py", line 216, in serve_application
    endpoints.lock_store if endpoints else None
  File "/opt/venv/lib/python3.7/site-packages/sanic/app.py", line 1167, in run
    serve(**server_settings)
  File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 892, in serve
    trigger_events(before_start, loop)
  File "/opt/venv/lib/python3.7/site-packages/sanic/server.py", line 668, in trigger_events
    loop.run_until_complete(result)
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/run.py", line 245, in load_agent_on_start
    _lock_store = LockStore.create(endpoints.lock_store)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 38, in create
    return _create_from_endpoint_config(obj)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 250, in _create_from_endpoint_config
    lock_store = _load_from_module_string(endpoint_config.type)
  File "/opt/venv/lib/python3.7/site-packages/rasa/core/lock_store.py", line 265, in _load_from_module_string
    f"Could not find a class based on the module path "
AttributeError: 'str' object has no attribute 'type'
@tatianafrank tatianafrank 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 Jun 16, 2020
@sara-tagger
Copy link
Collaborator

Thanks for raising this issue, @erohmensing 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 🤗

@tatianafrank
Copy link
Author

Following up @erohmensing @sara-tagger

@tatianafrank
Copy link
Author

ping

@chkoss chkoss mentioned this issue Jun 30, 2020
4 tasks
@chkoss
Copy link
Contributor

chkoss commented Jun 30, 2020

@tatianafrank Thank you for spotting this! The bug will be fixed in the next release.

@chkoss chkoss linked a pull request Jun 30, 2020 that will close this issue
4 tasks
@chkoss chkoss closed this as completed Jul 1, 2020
@tatianafrank
Copy link
Author

Thanks @chkoss ! When is the next release scheduled for?

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 type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants