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

JavaScript SDK & Python SDK Unable to Work Simultaneously #16

Open
MaryHewittWork opened this issue Jul 17, 2017 · 2 comments
Open

JavaScript SDK & Python SDK Unable to Work Simultaneously #16

MaryHewittWork opened this issue Jul 17, 2017 · 2 comments

Comments

@MaryHewittWork
Copy link

Currently trying to use the JavaScript SDK to type NLP commands that would be picked up by the Python SDK to kick off other Python processes. Unfortunately, it does not seem possible to run the two SDKs simultaneously. I am running on Ubuntu 14.04.5 in a VirtualBox system.

To recreate my situation:

  • Run a self instance.
  • Open the JavaScript SDK index.html in Google Chrome
  • Be able to communicate using the JavaScript SDK through text commands to Conversation and the Blackboard - i.e. I can see the text sent through the JavaScript SDK through the self instance terminal.
  • In another terminal, execute the python script - "Test_topic_client.py" from the Python SDK.
  • The following error shows in the console of Google Chrome (i.e. the JavaScript SDK):
Map.js:55 Uncaught TypeError: Cannot read property 'toString' of undefined
    at Map.hash (Map.js:55)
    at Map.get (Map.js:63)
    at BlackboardInstance.unsubscribeToType (Blackboard.js:114)
    at ExampleClassifier.onStop (ExampleClassifier.js:52)
    at onEvent (ClassifierManager.js:82)
    at WebSocket.TopicClientInstance.socket.onmessage (TopicClient.js:57)
  • Trying to send a message through the JavaScript SDK doesn't show any speech bubbles in the webpage, nor does it send through to the self instance.
  • Refreshing the index.html page results in the addition of the final line in the terminal window, as shown below. Note that there are ALSA errors due to running in a VirtualBox.
TopicClient Instantiated!
Topic Client is instantiated!
Connected!
On Connected function!
Sensor Manager has been instantiated!
adding sensor id: fbdedfd5-0848-4f8a-9327-635ac718a231
adding sensor id: e90156ce-412b-434c-b624-25c9eab4ed95
SpeechGesture has started!
adding gesture id: tts
WinstonHomeGesture has started!
adding gesture id: winston_home
Camera Sensor has started!
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
ExampleAgent has started!
ExampleAgent has stopped! # This line is added when JavaScript SDK Page is Refreshed.

I have tested my Python SDK, and it works fine to kick off my "winston_home" gesture when running on its own (i.e. without the JavaScript SDK running). However after the index.html page is refreshed, it appears that text is no longer transmitted to the Python SDK terminal window.

Your help is appreciated, as if this was solved we would be able to do some pretty amazing things with Intu!

@rlyle
Copy link
Contributor

rlyle commented Jul 20, 2017

Each client needs to have a unique self ID when they connect, otherwise the system will disconnect the other connection if the ID is the same.. this might be your issue.

@takaomoriyama
Copy link
Contributor

takaomoriyama commented Sep 11, 2017

@mhew49680, do you still have the issue ?
I tested in my environment, and test_topic_client.py worked if I changed selfId to non-empty string.
Also your write_test_to_blackboard.py worked fine! Input text was shown on the Web screen shown by Javascript SDK.

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

3 participants