IBM / clai

Command Line Artificial Intelligence or CLAI is an open-sourced project from IBM Research aimed to bring the power of AI to the command line interface.
https://clai-home.mybluemix.net/
MIT License
476 stars 74 forks source link

Clai does not work with python 3.8.1 #12

Closed twinstar26 closed 4 years ago

twinstar26 commented 4 years ago

Describe the bug Clai does not work with python 3.8.1 but Clai prerequisite mentions python 3.6.x + versions

To Reproduce Steps to reproduce the behavior:

  1. Install python 3.8.1
  2. Install Clai
  3. Restart terminal
  4. Bash commands don't work

output from terminal # ls ^CError in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/local/lib/python3.8/multiprocessing/util.py", line 277, in _run_finalizers finalizer() File "/usr/local/lib/python3.8/multiprocessing/util.py", line 201, in call res = self._callback(*self._args, self._kwargs) File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 689, in _terminate_pool cls._help_stuff_finish(inqueue, task_handler, len(pool)) File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 674, in _help_stuff_finish inqueue._rlock.acquire() KeyboardInterrupt Process ForkPoolWorker-2: Process ForkPoolWorker-4: Traceback (most recent call last): File "/usr/local/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/local/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, *self._kwargs) File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 114, in worker task = get() File "/usr/local/lib/python3.8/multiprocessing/queues.py", line 356, in get res = self._reader.recv_bytes() File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 216, in recv_bytes buf = self._recv_bytes(maxlength) File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes buf = self._recv(4) File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 379, in _recv chunk = read(handle, remaining) KeyboardInterrupt Traceback (most recent call last): File "/usr/local/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/usr/local/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(self._args, self._kwargs) File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 114, in worker task = get() File "/usr/local/lib/python3.8/multiprocessing/queues.py", line 356, in get res = self._reader.recv_bytes() File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 216, in recv_bytes buf = self._recv_bytes(maxlength) File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes buf = self._recv(4) File "/usr/local/lib/python3.8/multiprocessing/connection.py", line 379, in _recv chunk = read(handle, remaining) KeyboardInterrupt

^C #

note that I have waited for full 2 minutes before hitting CTRL+C.

shell and OS (please complete the following information):

TathagataChakraborti commented 4 years ago

Thanks @twinstar26 for reporting this, we will fix this as soon as we get back from AAAI next week. šŸ‘

twinstar26 commented 4 years ago

Great!! I will try to solve this issue this weekend. If I am unable, I will at least report my findings/progress so that it would be helpful for you guys to solve it next week. Best of luck for AAAI!

twinstar26 commented 4 years ago

Clai seems to be working with python 3.7.5. Python 3.8.x seems to be creating problems. So either we can detect python version before hand or warn users in docs OR workaround the problem :-') . In the traceback calls every function that's in the trace is of python standard library so cannot pin point which clai function is causing problem. But upon close inspection I suspect it seems that clai > datasource > stats_tracker.py and clai > datasource > action_remote_storage.pyare creating problems. Also please check this https://bugs.python.org/issue38501

flipper83 commented 4 years ago

it's a problem related with the threading creation. I'm working on it.

TathagataChakraborti commented 4 years ago

Should we close this? @flipper83