You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a bug when using cdsdashboards in our ML platform https://iko.ai
OSError: [Errno 99] Cannot assign requested address is returned both in the browser and the logs if the path is wrong in vosk.Model(path) in a streamlit app
It first shows the right error:
INFO:tornado.application:Process mainprocess failed with stdout: 2021-04-14 08:55:47.238 An update to the [server] config option section was detected. To have these changes be reflected, please restart streamlit.
LOG (VoskAPI:ReadDataFiles():model.cc:196) Decoding params beam=13 max-active=7000 lattice-beam=6
LOG (VoskAPI:ReadDataFiles():model.cc:199) Silence phones 1:2:3:4:5:6:7:8:9:10
ERROR (VoskAPI:ReadConfigFile():parse-options.cc:462) Cannot open config file: makach-menha/mfcc.conf
terminate called after throwing an instance of 'kaldi::KaldiFatalError'
what(): kaldi::KaldiFatalError
Then it keeps showing this weird error both in the browser and the logs
HTTPServerRequest(protocol='http', host='172.17.0.1', method='GET', uri='/notebook/jupyter/user/ haroune/iko-streamlit-bug/stream', version='HTTP/1.1', remote_ip='172.17.0.1')
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/tornado/tcpclient.py", line 138, in on_connect_done
stream = future.result()
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/websocket.py", line 105, in get
return await self.ws_get(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 339, in ws_get
await self._ws_open_proxy('localhost', self.port, path)
File "/opt/conda/lib/python3.8/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 413, in _ws_open_proxy
self.ws = await pingable_ws_connect(request=request,
File "/opt/conda/lib/python3.8/site-packages/tornado/iostream.py", line 1205, in connect
self.socket.connect(address)
OSError: [Errno 99] Cannot assign requested address
Also, this happened only once, the streamlit UI opened and keeps rerunning the app forever and show an error pop every now and then. I couldn't take a screenshot of the error in the streamlit UI because it was too fast.
To Reproduce
Install vosk: pip install vosk
Create a streamlit dashboard with the following content:
fromvoskimportModelmodel=Model('wrong/path/')
Screenshots
Configuration
fromcdsdashboards.appimportCDS_TEMPLATE_PATHSfromcdsdashboards.hubextensionimportcds_extra_handlersc.JupyterHub.template_paths=CDS_TEMPLATE_PATHSc.JupyterHub.extra_handlers=cds_extra_handlersc.JupyterHub.allow_named_servers=Truec.CDSDashboardsConfig.builder_class='cdsdashboards.builder.kubebuilder.KubeBuilder'# # Add `start.sh` to switch to NB_USER before running the commandc.VariableMixin.default_presentation_cmd= ['start.sh', 'python3', '-m', 'jhsingle_native_proxy.main']
# Options to remove Named Server / Dashboard sections for users on their home page. # You can remove the named server section and/or the new bottom section where # servers started to act as dashboards are hidden.c.JupyterHub.template_vars= {
'cds_hide_user_named_servers': True,
'cds_hide_user_dashboard_servers': False,
}
# Specify how to name dashbaord serversc.CDSDashboardsConfig.server_name_template='iko-{urlname}'# Control whether ‘All Users’ or ‘Selected Users’ is selected by default on the ‘New Dashboard’ page.c.CDSDashboardsConfig.default_allow_all=False# Show Spawner User Options Form before creating a dashboardc.CDSDashboardsConfig.spawn_default_options=Falsec.CDSDashboardsConfig.presentation_types= ['voila', 'streamlit', 'plotlydash', 'bokeh']
fromcdsdashboards.hubextension.spawners.variablekubeimportVariableKubeSpawnerclassCustomKubeSpawner(VariableKubeSpawner):
"Our custom KubeSpawner implementation"passc.JupyterHub.spawner_class=CustomKubeSpawner
The text was updated successfully, but these errors were encountered:
What happens if you run this in Streamlit locally, i.e. just on your laptop say?
The app logs the error and exit.
> streamlit run streamlit_app-wrong-input-path.py
You can now view your Streamlit app in your browser.
Network URL: http://10.4.1.17:8501
External URL: http://34.123.120.237:8501
LOG (VoskAPI:ReadDataFiles():model.cc:194) Decoding params beam=13 max-active=7000 lattice-beam=6
LOG (VoskAPI:ReadDataFiles():model.cc:197) Silence phones 1:2:3:4:5:6:7:8:9:10
ERROR (VoskAPI:ReadConfigFile():parse-options.cc:462) Cannot open config file: /tmp/vosk-model-ar-mgb2-0.4/mfcc.conf
terminate called after throwing an instance of 'kaldi::KaldiFatalError'
what(): kaldi::KaldiFatalError
Aborted
And I presume if you use the right path the app works fine?
Describe the bug
I noticed a bug when using cdsdashboards in our ML platform https://iko.ai
OSError: [Errno 99] Cannot assign requested address
is returned both in the browser and the logs if the path is wrong invosk.Model(path)
in a streamlit appIt first shows the right error:
Then it keeps showing this weird error both in the browser and the logs
Also, this happened only once, the streamlit UI opened and keeps rerunning the app forever and show an error pop every now and then. I couldn't take a screenshot of the error in the streamlit UI because it was too fast.
To Reproduce
pip install vosk
Screenshots
Configuration
The text was updated successfully, but these errors were encountered: