seme0021 / python-zillow

Python library for the Zillow API
Apache License 2.0
129 stars 64 forks source link

Fix/issue 33 #37

Closed stubs closed 1 year ago

stubs commented 5 years ago

GetSearchResults & GetDeepSearchResults both have an issue with returning either a single search result (of datatype OrderedDict) or a list of search results. This variable rtype behavior causes some calls to set_data to error out (as shown in seme0021/python-zillow#33).

Along with some minor code style suggestions, I have updated GetSearchResults & GetDeepSearchResults to always return a list of search results.

Tests still passing.

Hope this helped a little bit. Feel free to comment or suggest any changes to the PR.

CosmePantin commented 5 years ago

Using the test file and my own Zillow key, I am still getting the error:

`raise ZillowError({'message': "Zillow did not return a valid response: %s" % data})

ZillowError: {'message': 'Zillow did not return a valid response: <?xml version="1.0" encoding="utf-8"?><SearchResults:searchresults xsi:schemaLocation="http://www.zillow.com/static/xsd/SearchResults.xsd`

I am using the test file and it is pointing to the GetSearchResults function ` File "D:/Zillow API/Zillow-API-TEST.py", line 51, in data = api.GetSearchResults(key, address, postal_code)

File "C:\Anaconda3\lib\site-packages\zillow\api.py", line 66, in GetSearchResults raise ZillowError({'message': "Zillow did not return a valid response: %s" % data})`

stubs commented 5 years ago

@Reshkill can you possibly share what address, postalcode were passed to GetSearchResults() to see if I can recreate the behavior overhere?

odelo commented 4 years ago

Hello, I too am trying to run this example but am running into the same problem of source_data.get returning a list and it complaining about place.py. Is there something else I have to do? Only thing I changed was the used of my zillow key.

stubs commented 4 years ago

@cryptocolin @Reshkill. Just trying to get to the bottom of your errors here.

@Reshkill I see that you posted a portion of your error messages

File "C:\Anaconda3\lib\site-packages\zillow\api.py", line 66, in GetSearchResults raise ZillowError({'message': "Zillow did not return a valid response: %s" % data})`

Can you all both confirm that you have my forked version of the repo cloned and have my branch fix/issue_33 checked out? The only reason I ask is because there is nothing on my line 66.

Since this PR is still open, my changes that have fixed the errors in issue #33 have not been merged into seme0021's master branch yet.