Python FrappeClient with ERPNext version 12 problem

Hello. I am using Python FrappeClient with ERPNext version 12.16 but i am getting error this is my code

from frappeclient import FrappeClient
conn = FrappeClient(“http://localhost:8000/”)
conn.login(“username”, “password”)
lis = conn.get_list(‘Patient’)
print(lis)

when i use this code with ERPNext version 13 it is ok and there is no error
any help please?