IBM / nlc-icd10-classifier

A simple web app that shows how Watson's Natural Language Classifier (NLC) can classify ICD-10 code. The app is written in Python using the Flask framework and leverages the Watson Developer Cloud Python SDK
https://developer.ibm.com/patterns/classify-icd-10-data-with-watson/
Apache License 2.0
113 stars 57 forks source link

App crash due to dependency problem in watson developer python 2.0.0 sdk #30

Closed timroster closed 5 years ago

timroster commented 5 years ago

Deploying the application to Cloud Foundry fails due to dependency issues in version 2.0 of python sdk. Log messages from deployment showing the crash:

   2018-10-26T09:41:03.75-0700 [API/11] OUT App instance exited with guid 18870f06-7ee1-478b-b9fd-d1905cfaef95 payload: {"instance"=>"1b371d86-815b-426e-71ea-47d6", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>1, "crash_timestamp"=>1540572064653082121, "version"=>"7662cd2d-d2c1-4e89-bf3e-7890e066945b"}
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR Traceback (most recent call last):
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR   File "welcome.py", line 19, in <module>
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR     from watson_developer_cloud import NaturalLanguageClassifierV1
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR   File "/home/vcap/deps/0/python/lib/python2.7/site-packages/watson_developer_cloud/__init__.py", line 32, in <module>
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR     from .speech_to_text_v1_adapter import SpeechToTextV1Adapter as SpeechToTextV1
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR   File "/home/vcap/deps/0/python/lib/python2.7/site-packages/watson_developer_cloud/speech_to_text_v1_adapter.py", line 1, in <module>
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR     from watson_developer_cloud.websocket import RecognizeCallback, RecognizeListener, AudioSource
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR   File "/home/vcap/deps/0/python/lib/python2.7/site-packages/watson_developer_cloud/websocket/__init__.py", line 18, in <module>
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR     from .recognize_listener import RecognizeListener
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR   File "/home/vcap/deps/0/python/lib/python2.7/site-packages/watson_developer_cloud/websocket/recognize_listener.py", line 17, in <module>
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR     import websocket
   2018-10-26T09:41:04.34-0700 [APP/PROC/WEB/0] ERR ImportError: No module named websocket
   2018-10-26T09:41:04.42-0700 [APP/PROC/WEB/0] OUT Exit status 1
   2018-10-26T09:41:04.43-0700 [CELL/SSHD/0] OUT Exit status 0

The requirements.txt file is set to use version 2.0 and not later versions.