i am trying to add new corpus to train chatterbot but i have these errors
Traceback (most recent call last):
File "C:\Users\user1\Desktop\py\mmm.py", line 23, in <module>
"C:\Python27\Lib\site-packages\chatterbot_corpus\data\english\bank.corpus.js
on"
File "C:\Python27\chatterbot\trainers.py", line 114, in train
corpus_data = self.corpus.load_corpus(corpus)
File "C:\Python27\lib\site-packages\chatterbot_corpus\corpus.py", line 71, in
load_corpus
corpus = self.read_corpus(file_path)
File "C:\Python27\lib\site-packages\chatterbot_corpus\corpus.py", line 39, in
read_corpus
with io.open(file_name, encoding='utf-8') as data_file:
IOError: [Errno 22] Invalid argument: 'C:\\Python27\\Lib\\site-packages\\chatterbot_corpus\\data\\english\x08ank.corpus.json'
this the path for corpus:
chatterbot.train(
"C:\Python27\Lib\site-packages\chatterbot_corpus\data\english\bank.corpus.json"
)
Your issue is pin-pointed with this statement right here:
'IOError: [Errno 22] Invalid argument: 'C:\\Python27\\Lib\\site-packages\\chatterbot_corpus\\data\\english\x08ank.corpus.json'
You can solve this with:
chatterbot.train(r'C:\Python27\Lib\site-packages\chatterbot_corpus\data\english\bank.corpus.json')
@saraalosaid any updates about this issue?
i try chatterbot.train(r'C:\Python27\Lib\site-packages\chatterbot_corpus\data\english\bank.corpus.json') but it gives me the same error
Q&A sample corpus I was able to add and it worked fine.. used the same syntax wat described in the docs ...
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
Your issue is pin-pointed with this statement right here:
'IOError: [Errno 22] Invalid argument: 'C:\\Python27\\Lib\\site-packages\\chatterbot_corpus\\data\\english\x08ank.corpus.json'You can solve this with:
chatterbot.train(r'C:\Python27\Lib\site-packages\chatterbot_corpus\data\english\bank.corpus.json')