I copied an example, but get this when executing it:
Traceback (most recent call last):
File "chatterbot.py", line 1, in <module>
from chatterbot import ChatBot
File "/root/taartbot/chatterbot.py", line 1, in <module>
from chatterbot import ChatBot
ImportError: cannot import name ChatBot
This is a circular import error. You named your file chatterbot.py, then imported _from chatterbot_.
To fix this rename your chatterbot.py in /root/taartbot/ to something else.
Thanks, I was having same problem
i am trying to run this file name runtests.py but it show me this error can you please help to find aout the problem
File "C:\Users\Dhanesh\Desktop\Check it Please\ChatterBot-master\tests_django__init__.py", line 1, in
from .statement import Statement
ImportError: No module named 'tests_django.statement'
@DhaneshKumarHeerani If you are trying to run the tests for this project, please use the command python runtests.py, this will run the test suite for Django.
yes i did but it's not running i checked it showing this error
`Bash
C:\Users\Dhanesh\Desktop\Check it Please\ChatterBot-master>python runtests.py
Traceback (most recent call last):
File "runtests.py", line 16, in <module>
django.setup()
File "C:\Users\Dhanesh\AppData\Local\Programs\Python\Python35\lib\site-packages\django\__init__.py", line 17, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "C:\Users\Dhanesh\AppData\Local\Programs\Python\Python35\lib\site-packages\django\conf\__init__.py", line 55, in __getattr__
self._setup(name)
File "C:\Users\Dhanesh\AppData\Local\Programs\Python\Python35\lib\site-packages\django\conf\__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "C:\Users\Dhanesh\AppData\Local\Programs\Python\Python35\lib\site-packages\django\conf\__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "C:\Users\Dhanesh\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'mysite'
try to add current directory your python path I am not sure which operating system you are using, this command will work on Ubuntu export PYTHONPATH=${PYTHONPATH}:.
Well its the same issue i renamed it to inquiry but still not worked
Traceback (most recent call last):
File "inquiry.py", line 1, in
from chatterbot import Chatbot
ImportError: cannot import name 'Chatbot'
check the spelling once again.it is "ChatBot" not Chatbot.Hope it works fine
LMAO I just lost 1 hour with this.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This is a circular import error. You named your file
chatterbot.py, then imported _from chatterbot_.To fix this rename your
chatterbot.pyin/root/taartbot/to something else.