Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attribute Error #2345

Open
LiX-001 opened this issue Dec 31, 2023 · 2 comments
Open

Attribute Error #2345

LiX-001 opened this issue Dec 31, 2023 · 2 comments

Comments

@LiX-001
Copy link

LiX-001 commented Dec 31, 2023

Here's my code:

import time 
time.clock = time.time
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Rema')

trainer = ChatterBotCorpusTrainer(chatbot)
trainer.train("chatterbot.corpus.english")

response = chatbot.get_response("Hey, how are you?")
print(response)

And here's the error:

[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data]     [WinError 10060] A connection attempt failed because
[nltk_data]     the connected party did not properly respond after a
[nltk_data]     period of time, or established connection failed
[nltk_data]     because connected host has failed to respond>
[nltk_data] Error loading punkt: <urlopen error [WinError 10060] A
[nltk_data]     connection attempt failed because the connected party
[nltk_data]     did not properly respond after a period of time, or
[nltk_data]     established connection failed because connected host
[nltk_data]     has failed to respond>
[nltk_data] Error loading stopwords: <urlopen error [WinError 10061]
[nltk_data]     No connection could be made because the target machine
[nltk_data]     actively refused it>
[nltk_data] Error loading wordnet: <urlopen error [WinError 10061] No
[nltk_data]     connection could be made because the target machine
[nltk_data]     actively refused it>
Traceback (most recent call last):
  File "c:\Users\---------", line 9, in <module>
    trainer.train("chatterbot.corpus.english")
  File "C:\Users\---------\AppData\Local\Programs\Python\Python310-32\lib\site-packages\chatterbot\trainers.py", 
line 138, in train
    for corpus, categories, file_path in load_corpus(*data_file_paths):
  File "C:\Users\----------\AppData\Local\Programs\Python\Python310-32\lib\site-packages\chatterbot\corpus.py", line 64, in load_corpus
    corpus_data = read_corpus(file_path)
  File "C:\Users\-----------\AppData\Local\Programs\Python\Python310-32\lib\site-packages\chatterbot\corpus.py", line 38, in read_corpus
    return yaml.load(data_file)
TypeError: load() missing 1 required positional argument: 'Loader'

any fix?

@SarthakNikhal
Copy link

Can I work on this issue?

@LiX-001
Copy link
Author

LiX-001 commented Jan 22, 2024

Can I work on this issue?

why not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants