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

CoffeeMachineInferer.py example is not running #7

Open
arpan-vs opened this issue Apr 11, 2023 · 0 comments
Open

CoffeeMachineInferer.py example is not running #7

arpan-vs opened this issue Apr 11, 2023 · 0 comments

Comments

@arpan-vs
Copy link

Hello,
I'm running the "next" branch,
but I get error:

Server is started and listenning
Connected with 127.0.0.1:52198
5025: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5026: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5027: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5028: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5028: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5029: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5029: [ERROR] NetworkActiveKnowledgeBase:_submit_letter: a bytes-like object is required, not 'str'
5029: [ERROR] ObservationTable:__execute_query: Input and output words do not have the same size
Traceback (most recent call last):
  File "/workspaces/pylstar/src/pylstar/KnowledgeBase.py", line 113, in _resolve_word
    return self.knowledge_tree.get_output_word(word)
  File "/workspaces/pylstar/src/pylstar/KnowledgeTree.py", line 181, in get_output_word
    raise Exception("No path found")
Exception: No path found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/pylstar/src/pylstar/ObservationTable.py", line 866, in __execute_query
    self.knowledge_base.resolve_query(query)
  File "/workspaces/pylstar/src/pylstar/KnowledgeBase.py", line 103, in resolve_query
    query.output_word = self._resolve_word(query.input_word)
  File "/workspaces/pylstar/src/pylstar/KnowledgeBase.py", line 123, in _resolve_word
    self.knowledge_tree.add_word(input_word = word, output_word = output)
  File "/workspaces/pylstar/src/pylstar/KnowledgeTree.py", line 220, in add_word
    raise Exception("Input and output words do not have the same size")
Exception: Input and output words do not have the same size
Stoping coffeemachine
Coffee machine process is forced to stop
Traceback (most recent call last):
  File "/workspaces/pylstar/test/src/test_pylstar/coffee_machine_example/CoffeeMachineInferer.py", line 78, in <module>
    main()
  File "/workspaces/pylstar/test/src/test_pylstar/coffee_machine_example/CoffeeMachineInferer.py", line 62, in main
    coffee_state_machine = lstar.learn()
  File "/workspaces/pylstar/src/pylstar/LSTAR.py", line 274, in learn
    self.__initialize()
  File "/workspaces/pylstar/src/pylstar/LSTAR.py", line 368, in __initialize
    self.observation_table.initialize()
  File "/workspaces/pylstar/src/pylstar/ObservationTable.py", line 87, in initialize
    self.__add_word_in_S(Word([EmptyLetter()]))
  File "/workspaces/pylstar/src/pylstar/ObservationTable.py", line 803, in __add_word_in_S
    self.__add_word_in_SA(new_word)
  File "/workspaces/pylstar/src/pylstar/ObservationTable.py", line 843, in __add_word_in_SA
    raise Exception("Query '{}' could not be queries".format(output_query))
Exception: Query 'OutputQuery(I = [Letter('REFILL_WATER'), Letter('REFILL_WATER')], O = None)' could not be queries
Connected with 127.0.0.1:52202
Connected with 127.0.0.1:52210
Connected with 127.0.0.1:52224
Connected with 127.0.0.1:52228
Connected with 127.0.0.1:52236

How to resolve the above error @gbossert ?

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