主要代码=
elif choice == "5":
print(f"{COLOR_CODE['GREEN']} Выполните все ниже перечисленные требования!")
print(f"{COLOR_CODE['GREEN']} Почты которые можно добавить: Gmail, hotmail, mail")
print(f"{COLOR_CODE['GREEN']} ┌─────────────────────────────────────────────────────┐")
emailst = input(f" │ > 1. Введите почту:")
passwordst = input(f" │ > 2. Введите пароль:")
print(f"{COLOR_CODE['GREEN']} └─────────────────────────────────────────────────────┘")
try:
with open("senders.json", "r") as f:
senders = json.load
except FileNotFoundError:
senders = {}
senders[emailst] = passwordst
with open("senders.json", "w") as f:
json.dump(senders, f, indent=4)
print(f"{COLOR_CODE['GREEN']} > Почта {emailst} успешно добавлена в софт!{COLOR_CODE['GREEN']}")
time.sleep(5)
错误 -
File "C:\Users\Wizi\Desktop\ExSnoser 0.3 MOBILE\main.py", line 570, in main
senders[emailst] = passwordst
~~~~~~~^^^^^^^^^
TypeError: 'function' object does not support item assignment
看来一切都写对了,程序接收到了所有信息!其他使用信息(邮件、邮件密码)的功能也很棒!