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

rasa shell时候报错 #3

Open
MrRace opened this issue Jan 4, 2020 · 0 comments
Open

rasa shell时候报错 #3

MrRace opened this issue Jan 4, 2020 · 0 comments

Comments

@MrRace
Copy link

MrRace commented Jan 4, 2020

在训练完模型后,尝试使用rasa shell 进行命令行方式交互对话时,报错:

2020-01-04 10:37:48 INFO     root  - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2020-01-04 10:37:48 INFO     root  - Starting Rasa server on http://localhost:5005
2020-01-04 10:37:51 INFO     absl  - Entry Point [tensor2tensor.envs.tic_tac_toe_env:TicTacToeEnv] registered with id [T2TEnv-TicTacToeEnv-v0]
Bot loaded. Type a message and press enter (use '/stop' to exit): 
Your input ->  广州今天天气                                                                                                                                                                                       
/tmp/tmpno3k5753/nlu/addons_ner_bilstm_crf_tf
2020-01-04 10:38:19 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<configure_app.<locals>.run_cmdline_io() done, defined at /home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/run.py:124> exception=TimeoutError()>
Traceback (most recent call last):
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/run.py", line 128, in run_cmdline_io
    server_url=constants.DEFAULT_SERVER_FORMAT.format("http", port)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/channels/console.py", line 135, in record_messages
    async for response in bot_responses:
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/channels/console.py", line 101, in send_message_receive_stream
    async for line in resp.content:
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/aiohttp/streams.py", line 39, in __anext__
    rv = await self.read_func()
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/aiohttp/streams.py", line 328, in readline
    await self._wait('readline')
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/aiohttp/streams.py", line 296, in _wait
    await waiter
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/aiohttp/helpers.py", line 596, in __exit__
    raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError
Transport closed @ ('127.0.0.1', 32964) and exception experienced during error handling
2020-01-04 10:38:19 ERROR    asyncio  - Task exception was never retrieved
future: <Task finished coro=<RestInput.on_message_wrapper() done, defined at /home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/channels/channel.py:392> exception=OSError('SavedModel file does not exist at: /tmp/tmpno3k5753/nlu/addons_ner_bilstm_crf_tf/{saved_model.pbtxt|saved_model.pb}',)>
Traceback (most recent call last):
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 406, in on_message_wrapper
    await on_new_message(message)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/channels/channel.py", line 82, in handler
    await app.agent.handle_message(*args, **kwargs)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/agent.py", line 486, in handle_message
    return await processor.handle_message(message)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/processor.py", line 83, in handle_message
    tracker = await self.log_message(message, should_save_tracker=False)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/processor.py", line 154, in log_message
    await self._handle_message_with_tracker(message, tracker)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/processor.py", line 358, in _handle_message_with_tracker
    parse_data = await self._parse_message(message, tracker)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/processor.py", line 337, in _parse_message
    message.text, message.message_id, tracker
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/core/interpreter.py", line 283, in parse
    result = self.interpreter.parse(text, message_id)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa/nlu/model.py", line 380, in parse
    component.process(message, **self.context)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/rasa_contrib/nlu/extractors/bilstm_crf_tf_entity_extractor.py", line 112, in process
    self.predict_fn = predictor.from_saved_model(real_result_dir)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/contrib/predictor/predictor_factories.py", line 153, in from_saved_model
    config=config)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/contrib/predictor/saved_model_predictor.py", line 153, in __init__
    loader.load(self._session, tags.split(','), export_dir)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 324, in new_func
    return func(*args, **kwargs)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 268, in load
    loader = SavedModelLoader(export_dir)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 284, in __init__
    self._saved_model = parse_saved_model(export_dir)
  File "/home/liujiepeng/KG/QA/TaskQA/WeatherBot/micro_weatherbot_CN_env_py36/lib/python3.6/site-packages/tensorflow_core/python/saved_model/loader_impl.py", line 83, in parse_saved_model
    constants.SAVED_MODEL_FILENAME_PB))
OSError: SavedModel file does not exist at: /tmp/tmpno3k5753/nlu/addons_ner_bilstm_crf_tf/{saved_model.pbtxt|saved_model.pb}

image
这个错误主要是源于 ERROR asyncio - Task exception was never retrieved吗?请问下,这里的错误该如何消除,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant