pyzillow icon indicating copy to clipboard operation
pyzillow copied to clipboard

incorrect address not handled

Open wmjones opened this issue 7 years ago • 3 comments

When i run the code

print GetDeepSearchResults(zillow_data.get_deep_search_results("1600 Pennsylvania Ave NW", "20500"))

it works fine but when i run

print GetDeepSearchResults(zillow_data.get_deep_search_results("1600 Penn Ave NW", "20500"))

I get

Traceback (most recent call last): File "main.py", line 18, in print GetDeepSearchResults(zillow_data.get_deep_search_results("1600 Penns Ave NW", "20500")) File "/usr/local/lib/python2.7/site-packages/pyzillow/pyzillow.py", line 31, in get_deep_search_results return self.get_data(url, params) File "/usr/local/lib/python2.7/site-packages/pyzillow/pyzillow.py", line 82, in get_data raise ZillowError(int(response.findall('message/code')[0].text)) pyzillow.pyzillowerrors.ZillowError: <exception str() failed>

Is this supposed to be happening? Is there a way for the program to not crash when I put in an address that Zillow doesnt have?

wmjones avatar Apr 03 '17 16:04 wmjones

Exactly same issue, hope it gets resolved soon...

krav4 avatar Jun 13 '17 03:06 krav4

It is supposed to output error code 503 but it is not supposed to crash

krav4 avatar Jun 13 '17 03:06 krav4

I found a solution that is somewhat satisfying. You can comment the places in the wrapper that are supposed to raise errors. Go to line 82 and comment that whole chunk, it will throw you another error, which is fixable in a same way

krav4 avatar Jun 14 '17 22:06 krav4