kubeedge / sedna

AI tookit over KubeEdge
https://sedna.readthedocs.io
Apache License 2.0
505 stars 163 forks source link

Thread problem when runing run_kb.py script in python 3.9 #236

Open JensenJian opened 2 years ago

JensenJian commented 2 years ago

What happened: When I ran the lifelong learning knowledge base run_kb.py. It shows: Traceback (most recent call last): File "D:\sedna-main\lib\sedna\service\run_kb.py", line 36, in main() File "D:\sedna-main\lib\sedna\service\run_kb.py", line 32, in main KBServer(host=host, http_port=int(port), save_dir=kb_dir).start() File "D:\sedna-main\lib\sedna\service\server\knowledgeBase\server.py", line 92, in start return self.run(self.app) File "D:\sedna-main\lib\sedna\service\server\base.py", line 93, in run return self.wait_stop(current=current_thread) File "D:\sedna-main\lib\sedna\service\server\base.py", line 99, in wait_stop if not current.isAlive(): AttributeError: 'Thread' object has no attribute 'isAlive'

It seems because I am using Python 3.9. and the Thread object attribute is changed from isAlive to is_alive

JoeyHwong-gk commented 2 years ago

Thanks for reporting! Looks like it's an easy fix. Would you like to contribute the pull request yourself?