DeepQA icon indicating copy to clipboard operation
DeepQA copied to clipboard

ModuleNotFoundError: No module named 'chatbot.textdata'; 'chatbot' is not a package

Open mrinal18 opened this issue 7 years ago • 3 comments

hey, i am not able to solve this error just after training

eloaded modules: chatbot, chatbot.chatbot, chatbot.textdata, chatbot.corpus.cornelldata, chatbot.corpus.opensubsdata, chatbot.corpus.scotusdata, chatbot.corpus.ubuntudata, chatbot.corpus.lightweightdata, chatbot.model Traceback (most recent call last):

File "", line 1, in runfile('/home/bizviz/DeepQA/chatbot/chatbot.py', wdir='/home/bizviz/DeepQA/chatbot')

File "/home/bizviz/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile execfile(filename, namespace)

File "/home/bizviz/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "/home/bizviz/DeepQA/chatbot/chatbot.py", line 33, in from chatbot.textdata import TextData

File "/home/bizviz/DeepQA/chatbot/chatbot.py", line 33, in from chatbot.textdata import TextData

ModuleNotFoundError: No module named 'chatbot.textdata'; 'chatbot' is not a package

mrinal18 avatar Jun 14 '17 07:06 mrinal18

I meet the similar problem.I solve it by add the below sentences before line 33. import sys sys.path.append('D:/DeepQA/chatbot')

you can try it.remember modify the directory for yourself.

BobCN2017 avatar Jun 24 '17 15:06 BobCN2017

This is a Py36 issue. I was able to resolve by switching to Py35.

shre81 avatar Jan 15 '18 12:01 shre81

change the name of chatbot.py into chatbot1.py because the package and chatbot.py ,do not have the same name

wujiajia2017scnu avatar Apr 24 '18 13:04 wujiajia2017scnu