kaldi-gstreamer-server icon indicating copy to clipboard operation
kaldi-gstreamer-server copied to clipboard

Does this work with Python 3

Open wuhufeirenxin opened this issue 6 years ago • 6 comments

I‘m trying to use python 3, Python 3.5.2 on Ubuntu16.04.2 for specific.

After modifying some module name. The server and worker are ready.

However, the socket seems to be closed right after the first message is received by work. Attached some log here: DEBUG 2018-07-05 14:54:23,135 (gx_worker.py:received_message():108) : Got message from server of type <class 'ws4py.messaging.TextMessage'> in State 1. INFO 2018-07-05 14:54:23,136 (gx_worker.py:received_message():109) self.STATE_CONNECTED: 1. DEBUG 2018-07-05 14:54:23,136 (gx_worker.py:closed():190) : Websocket closed() called INFO 2018-07-05 14:54:23,136 (gx_worker.py:finish_request():156) : enter finish_request, State is 1. INFO 2018-07-05 14:54:23,136 (gx_worker.py:finish_request():159) : enter finish_request, State is STATE_CONNECTED. INFO 2018-07-05 14:54:23,136 (gx_decoder2.py:finish_request():174) : Resetting decoder state INFO 2018-07-05 14:54:23,137 (gx_decoder2.py:finish_request():180) : Done setting pipline state. DEBUG 2018-07-05 14:54:23,137 (gx_worker.py:closed():192) : Websocket closed() finished INFO 2018-07-05 14:54:23,138 (gx_worker.py:main_loop():395) After run_forever(). INFO 2018-07-05 14:54:24,139 (gx_decoder2.py:set_eos_handler():272) : Setting eos handler. INFO 2018-07-05 14:54:24,139 (gx_worker.py:init():76) : init() done; State is 0. INFO 2018-07-05 14:54:24,139 (gx_worker.py:main_loop():392) Opening websocket connection to master server INFO 2018-07-05 14:54:24,146 (gx_worker.py:opened():79) Opened websocket connection to server INFO 2018-07-05 14:54:24,146 (gx_worker.py:opened():82) : After opened, state is 1.

wuhufeirenxin avatar Jul 05 '18 07:07 wuhufeirenxin

It's a bit embarrassing but I'm afraid it's not compatible with Python 3. It's definitely on my TODO list as I also want to move to Python 3, but I cannot give any time estimate.

alumae avatar Jul 05 '18 14:07 alumae

All right. I am trying to make it work on Python 3. I'll let u known if I make it. The good news is that the problem above is due to a bug of my own, while the bad news is there is some other problem after I fix the above one.

wuhufeirenxin avatar Jul 05 '18 15:07 wuhufeirenxin

Any update on this?

FredericGodin avatar Jul 11 '19 11:07 FredericGodin

I am also curious about this.

denialhaq avatar Dec 22 '21 07:12 denialhaq

@denialhaq did you try the py3 branch

sirifarif avatar Dec 22 '21 08:12 sirifarif

Hi @sirifarif,

I just try the branch, when i run the master_server.py i got this error

# python3 kaldigstserver/master_server.py --port=8100
Traceback (most recent call last):
  File "kaldigstserver/master_server.py", line 18, in <module>
    from Queue import Queue
ModuleNotFoundError: No module named 'Queue'

denialhaq avatar Dec 24 '21 03:12 denialhaq