i was trying to make Telegram bot and in the Chatbot code i have this problem whenever i run it "Unindent does not match any outer indentation level" and i still have no idea how to fix it, i already try to change the symbols and anything
import json
import subprocess as s
class Chatbot():
def __init__(self, name):
try:
memory = open(name+'.json','r')
except FileNotFoundError:
memory = open(name+'.json','w')
memory.write('["Will","Alfredo"]')
memory.close()
memory = open(name+'.json','r')
self.name = name
self.known = json.load(memory)
memory.close()
self.historico = []
self.phrases = {'hello': 'hello, my name is GiroBot','goodbye':'bye, see you next time!'}
def listening(self,phrases=None):
if phrases == None:
phrases = input('>: ')
phrases = str(phrases)
phrases = phrases.lower()
phrases = phrases.replace('e','eh')
return phrases
def thinking(self,phrases):
if phrases in self.phrases:
return self.phrases[phrases]
if phrases == 'learn':
key = input('Digite a phrases: ')
resp = input('Digite a response: ')
self.phrases[key] = resp
that is the code and i have problem with this
def listening(self,phrases=None):
^
there is where i got Unindent does not match any outer indentation level, please help