我从github和不同的站点下载了多个项目,因为我在android studio中弄乱相机,但是尝试运行它们时却遇到相同的错误。我从下载了另一个项目,但遇到了同样的错误,因此我放弃并决定发布此问题。
class Ticket():
def __init__(self, dictionary):
contacts_list = []
self.first_name = dictionary['first_name']
self.last_name = dictionary['last_name']
self.contacts = contacts_list.get_contacts(dictionary, contacts_list)
def get_contacts(dictionary, contacts_list):
counter = 0
search_dict = {
"name" : "name" + str(counter),
"email" : "email" + str(counter),
"phone" : "phone" + str(counter),
}
while search_dict["name"] in dictionary:
contact = []
contact.append(result[search_dict["name"]])
contact.append(result[search_dict["email"]])
contact.append(result["phone"])
contacts_list.append(contact)
counter = update_search_keys(search_dict, counter)
def update_search_keys(dict, counter):
counter += 1
for key in dict:
dict[key] = key + str(counter)
return counter