Chatterbot: adding new corpus problem

Created on 14 Jun 2017  路  5Comments  路  Source: gunthercox/ChatterBot

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"
)

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')

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

filipceglik picture filipceglik  路  3Comments

thedp picture thedp  路  4Comments

AmusingThrone picture AmusingThrone  路  3Comments

coolrb picture coolrb  路  3Comments

vkosuri picture vkosuri  路  4Comments