Hi everyone, I am trying to run rasa x in this environment and am getting this error. rasa shell and rasa run are working peoperly. So i belivee my domain.yml and config.yml files are in the right path. I tried a lot to fix it. Please help me to get rid of this and move forward. Thank you all in advance.
Interesting error. Are you just running rasa x
and then this happens? Which version of Rasa X are you running? @erohmensing I remember seeing that you fixed some encoding stuff somewhere recently?
Hi all, I’m having exacly the same problem, running rasa latest rasa shell, rasa run --enable-api works ok, but running rasa x get this problem:
Using ubuntu, python 3.6 , if you need any other data from me to sole this please let me know, thanks.
u:~/rasa$ rasa x
WARNING: Logging before flag parsing goes to stderr.
W0711 20:56:09.452179 139872976144192 deprecation_wrapper.py:118] From /home/ubuntu/.local/lib/python3.6/site-packages/rasa/utils/common.py:113: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.
Starting Rasa X in local mode... 🚀
WARNING: Logging before flag parsing goes to stderr.
W0711 20:56:14.296167 140424807159616 deprecation_wrapper.py:118] From /home/ubuntu/.local/lib/python3.6/site-packages/rasa/core/policies/policy.py:35: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.
W0711 20:56:15.753621 140424807159616 deprecation_wrapper.py:118] From /home/ubuntu/.local/lib/python3.6/site-packages/rasa/utils/common.py:113: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.
2019-07-11 20:56:15 WARNING tensorflow - From /home/ubuntu/.local/lib/python3.6/site-packages/rasa/utils/common.py:113: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasa/cli/x.py", line 322, in run_locally
local.main(args, project_path, args.data, token=rasa_x_token)
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/local.py", line 190, in main
project_path, data_path, session, args.port
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/local.py", line 157, in _initialize_with_local_data
story_files, story_service, COMMUNITY_USERNAME, COMMUNITY_TEAM_NAME
File "uvloop/loop.pyx", line 1451, in uvloop.loop.Loop.run_until_complete
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/initialise.py", line 109, in inject_stories
story_files, team, username
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/services/story_service.py", line 200, in save_stories_from_files
await self.add_domain_items_for_stories()
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/services/story_service.py", line 363, in add_domain_items_for_stories
await self._add_story_items_to_domain(project_id, story_events)
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/services/story_service.py", line 370, in _add_story_items_to_domain
actions=story_events[0],
TypeError: 'NoneType' object is not subscriptable
@jgaya your ‘NoneType’ object is not subscriptable
is not the same issue as the charmap codec can't encode characters
issue.
If actions=story_events[0]
is empty, do you have an initial project set up in the directory where you are running rasa x with the same directory set up as rasa init
?
@technophile_2507 this has to do with how your console encodes I/O from python. Can you try the fixes here? UnicodeDecodeError
I have a bot working in that dir, imported from dialog flow. follow the tutoraial for that. I am missing some config files?
What command do you use to successfully run rasa shell?
Just “rasa shell” works fine. Anything that can help me with this will be appreciated, it is the only thing that it’s not working for me. Thanks.
Hmm okay and you have rasa stories written in the data
directory?
I am missing some config files?
Can you quickly describe your project directory for me?
Okay that setup looks fine , and the content of your stories file(s)?
I check I don’t have a data/stories.md file if that is the one you are refering to. That one missing could be the problem here?
Yes I think so that is where rasa x is looking for your stories.
File "/home/ubuntu/.local/lib/python3.6/site-packages/rasax/community/services/story_service.py", line 370, in _add_story_items_to_domain
actions=story_events[0],
TypeError: 'NoneType' object is not subscriptable
There it is looking for the first story event, but if you don’t have any stories, then it won’t find any.
Do you have stories anywhere else? You can also pass the path to your data (stories and NLU) folder if you don’t have your data in the usual folder. See the entire list of parameters here
What do you have in your data
directory?
I added the stories.md with at least a story and rasa x started working. Thank you for helping me out
Sure thing. One question for you – which version of rasa x are you running? (pip show | grep rasa
) – I tried running rasa x
without stories on the latest version and go no errors, so I’m just wondering.
Check it out : typeerror nonetype object is not subscriptable