Basically, I using RETS to pull some listing from TREB using an MLS number. but I am getting below error while trying to iterate through the generator.
Error:
dmql_query = search_helper.filter_to_dmql(filter_dict=search_filter) File "C:\Users\a\AppData\Local\Programs\Python\Python39\lib\site-packages\rets\utils\search.py", line 32, in filter_to_dmql raise TypeError( TypeError: Expected a dictionary type buy got <class 'str'> instead.
Code:
rets_client = Session(login_url, username, password, user_agent="python/rets", version="RETS/1.7")
rets_client.login()
system_data = rets_client.get_system_metadata()
search_res = rets_client.search('Property', 'ResidentialProperty', '(Ml_num="C5437829")')
print(search_res, type(search_res))
resultDict = dict(search_res)
print(search_res, type(resultDict))
for result in resultDict:
print(result)
Can anyone tell me what the problem is?