AttributeError: module 'dateutil' has no attribute 'parser'
See original GitHub issueHello guys,
I use mongoDB and storage_adapter=“chatterbot.storage.MongoDatabaseAdapter” DB info:
root@chatbot:/home/db# mongo -version
MongoDB shell version v3.6.3
> show dbs
admin 0.000GB
chatterbot-database 0.000GB
``
**python script info:**
```Python
`# -*- coding: utf-8 -*-
from chatterbot import ChatBot
# Uncomment the following lines to enable verbose logging
# import logging
# logging.basicConfig(level=logging.INFO)
# Create a new ChatBot instance
bot = ChatBot(
'Terminal',
storage_adapter='chatterbot.storage.MongoDatabaseAdapter',
logic_adapters=[
'chatterbot.logic.BestMatch'
],
filters=[
'chatterbot.filters.RepetitiveResponseFilter'
],
input_adapter='chatterbot.input.TerminalAdapter',
output_adapter='chatterbot.output.TerminalAdapter',
database='chatterbot-database'
)
print('Type something to begin...')
while True:
try:
bot_input = bot.get_response(None)
# Press ctrl-c or ctrl-d on the keyboard to exit
except (KeyboardInterrupt, EOFError, SystemExit):
break`
result info:
root@chatbot:/home/chatbot/py# python3 seven.py
Type something to begin...
haha
hello
nihao
ai.yml Training: [ ] 1%Traceback (most recent call last):
File "seven.py", line 28, in <module>
bot_input = bot.get_response(None)
File "/usr/local/lib/python3.5/dist-packages/chatterbot/chatterbot.py", line 1 19, in get_response
self.learn_response(statement, previous_statement)
File "/usr/local/lib/python3.5/dist-packages/chatterbot/chatterbot.py", line 1 44, in learn_response
Response(previous_statement.text)
File "/usr/local/lib/python3.5/dist-packages/chatterbot/conversation.py", line 194, in __init__
import dateutil.parser as date_parser
File "/usr/local/lib/python3.5/dist-packages/dateutil/parser.py", line 40, in <module>
from six import text_type, binary_type, integer_types
File "/home/chatbot/py/six.py", line 15, in <module>
chatbot.train('chatterbot.corpus.english')
File "/usr/local/lib/python3.5/dist-packages/chatterbot/trainers.py", line 164 , in train
Response(previous_statement_text)
File "/usr/local/lib/python3.5/dist-packages/chatterbot/conversation.py", line 194, in __init__
import dateutil.parser as date_parser
**AttributeError: module 'dateutil' has no attribute 'parser'**
how to solve this error ?
thank you
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
AttributeError: module 'dateutil' has no attribute 'parse'
You can fix this error by modifying your code slightly: from dateutil import parser print(parser.parse("24.05.2017")).
Read more >Kubernetes dateutil.parser.parse(value) AttributeError: module ...
Kubernetes dateutil. parser. parse(value) AttributeError: module 'dateutil' has no attribute 'parser' - [Deprecated] Rasa X Community Edition - ...
Read more >AttributeError: module 'dateutil' has no attribute 'parse'
Trying to use dateutil to parse dates from an unknown format but none of the documented methods are found? CODE:
Read more >[conda] problems with dateutil
import dateutil dateutil.parser. Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'dateutil' has no attribute ...
Read more >dateutil Documentation
The dateutil module provides powerful extensions to the standard ... Parser issue where calling parse() on dates with no day specified when ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bruceforlearn / @vkosuri The
dateutill
package should come preinstalled as a part of the standard Python installation so no need to install it with pip.@bruceforlearn I see a few lines in your comments that suggest you have both python 2 and python 3 installed on your system. I suspect that this might be a path issue but I don’t know of a good way to verify this.
I’d suggest trying the following.
dateutil
and not ChatterBot, you might be able to ask a question aboutdateutil
errors on Stack Overflow to get help from developers who may have encountered this issue before.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.