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

Weatherbot: Could not run the new version of code to create a custom channel to create widget #44

Open
vishnudatsci opened this issue Oct 26, 2018 · 1 comment

Comments

@vishnudatsci
Copy link

I used the Advanced Usage with a custom Rasa Core project as Custom Channel from Python using https://github.com/scalableminds/chatroom as suggested in RASA docs.

I updated the libraries using the new version of weatherbot tutorial, and tried to run the following code 'run_application.py' . The code reference is from https://github.com/scalableminds/chatroom

from rasa_core.channels.slack import SlackInput
from rasa_core.agent import Agent
from rasa_core.interpreter import RasaNLUInterpreter
import yaml
from rasa_core.utils import EndpointConfig


nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
action_endpoint = EndpointConfig(url="http://localhost:5055/webhook")
agent = Agent.load('./models/dialogue', interpreter = nlu_interpreter, action_endpoint = action_endpoint)


# Creating the Interpreter and Agent
def load_agent(): 
    nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/productnlu')
    agent = Agent.load('./models/dialogue', interpreter = nlu_interpreter)
    #return agent

# Creating the server
def main_server():
    agent = load_agent()

    channel = BotServerInputChannel(agent, port=5005)
    agent.handle_channels([channel], http_port=5005)

main_server()
After installing the specified packages in 'requirements.txt' file and running the above code, I get the following error.

tf.estimator package not installed.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow import compat
  File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\compat\__init__.py", line 21, in <module>
    from tensorflow.python.compat.compat import forward_compatibility_horizon
ModuleNotFoundError: No module named 'tensorflow.python.compat'
@vishnudatsci
Copy link
Author

Tried to update tensorflow package, still did not work. What is the version of tensorflow to be used?

C:\Users\vishn\Anaconda3\lib\site-packages\h5py\__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
tf.estimator package not installed.
Traceback (most recent call last):
  File "run_application.py", line 2, in <module>
    from rasa_core.agent import Agent
  File "C:\Users\vishn\Anaconda3\lib\site-packages\rasa_core\agent.py", line 31, in <module>
    from rasa_core.policies import Policy
  File "C:\Users\vishn\Anaconda3\lib\site-packages\rasa_core\policies\__init__.py", line 9, in <module>
    from rasa_core.policies.keras_policy import KerasPolicy
  File "C:\Users\vishn\Anaconda3\lib\site-packages\rasa_core\policies\keras_policy.py", line 11, in <module>
    import tensorflow as tf
  File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
    from tensorflow import compat
  File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\compat\__init__.py", line 21, in <module>
    from tensorflow.python.compat.compat import forward_compatibility_horizon
ModuleNotFoundError: No module named 'tensorflow.python.compat'

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