hanneshapke/pyzillow

get_deep_search_results() throws TypeError, both arguments are unicode

ReddyKilowatt opened this issue · 10 comments

get_deep_search_results() is throwing a TypeError exception, when both arguments are unicode.
Could use some help with this.

thanks

Hi ReddyKilowatt,

Happy to help. Unfortunately, I'm traveling right now and don't have access to a machine.

I'll be back online at the beginning of May.

On 28/04/2016, at 10:53 PM, ReddyKilowatt notifications@github.com wrote:

get_deep_search_results() is throwing a TypeError exception, when both arguments are unicode.
Could use some help with this.

thanks


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

I'm using pyzillow 0.5.5, that I installed manually with pip, so I suspect it is the most recent.

This line is failing
if response.findall('message/code')[0].text is not '0':
raise ZillowError(int(response.findall('message/code')[0].text))
but I don't know enough about what repsonse.findall() is trying to do.

Hi

I'm going to be busy until tonight.
Will try to duplicate the problem again then reply with details. Thanks.
In case I forget, please ping me in about 9 hours or so

On Friday, May 13, 2016, ZAD-Man notifications@github.com wrote:

@ReddyKilowatt https://github.com/ReddyKilowatt - Do you happen to be
getting a '6' status message (where there should be a '0' if it was
successful)? That's what I'm dealing with right now...that code isn't in
the dict that has the error code/error message associations, so I get a
KeyError when that ZillowError is raised.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

On this line in my code
zillow_data.get_deep_search_results(address, zip code)

The following exception is being raised

---------------------------------------------------------------------------TypeError
Traceback (most recent call
last)/Users/tonycappellini/anaconda/envs/py27dev/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
in run_code(self, code_obj, result) 2900 if result is
not None: 2901 result.error_in_exec =
sys.exc_info()[1]-> 2902 self.showtraceback() 2903
else: 2904 outflag = 0
/Users/tonycappellini/anaconda/envs/py27dev/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc
in showtraceback(self, exc_tuple, filename, tb_offset, exception_only)
1830 value, tb,
tb_offset=tb_offset) 1831 -> 1832
self._showtraceback(etype, value, stb) 1833 if
self.call_pdb: 1834 # drop into debugger
/Users/tonycappellini/anaconda/envs/py27dev/lib/python2.7/site-packages/ipykernel/zmqshell.pyc
in _showtraceback(self, etype, evalue, stb) 436
u'traceback' : stb, 437 u'ename' :
unicode_type(etype.name),--> 438 u'evalue' :
py3compat.safe_unicode(evalue), 439 } 440
/Users/tonycappellini/anaconda/envs/py27dev/lib/python2.7/site-packages/ipython_genutils/py3compat.pyc
in safe_unicode(e) 63 """ 64 try:---> 65
return unicode_type(e) 66 except UnicodeError: 67
pass
TypeError: coercing to Unicode: need string or buffer, dict found

On Fri, May 13, 2016 at 1:40 PM, ZAD-Man notifications@github.com wrote:

@ReddyKilowatt https://github.com/ReddyKilowatt - Do you happen to be
getting a '6' status message (where there should be a '0' if it was
successful)? That's what I'm dealing with right now...that code isn't in
the dict that has the error code/error message associations, so I get a
KeyError when that ZillowError is raised.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

Do you have any idea what caused the exception I sent a few days ago?

On Sat, May 14, 2016 at 9:45 AM, Tony Cappellini cappy2112@gmail.com
wrote:

Hi

I'm going to be busy until tonight.
Will try to duplicate the problem again then reply with details. Thanks.
In case I forget, please ping me in about 9 hours or so

On Friday, May 13, 2016, ZAD-Man notifications@github.com wrote:

@ReddyKilowatt https://github.com/ReddyKilowatt - Do you happen to be
getting a '6' status message (where there should be a '0' if it was
successful)? That's what I'm dealing with right now...that code isn't in
the dict that has the error code/error message associations, so I get a
KeyError when that ZillowError is raised.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#7 (comment)

I'm running version 0.5.5 with Python 3.5/Anaconda3 and am getting a similar error

It works when I test using the address ('1600 Pennsylvania Avenue NW', '20500') but not for the specific zillow_id of the home I'm trying to pull for.

Traceback (most recent call last):
  File "C:/....../zillowtest.py", line 19, in <module>
    updated_property_details_response = zillow_data.get_updated_property_details(zillow_id)
  File "C:\....\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyzillow-0.5.5-py3.5.egg\pyzillow\pyzillow.py", line 43, in get_updated_property_details
    return self.get_data(url, params)
  File "C:\.....\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyzillow-0.5.5-py3.5.egg\pyzillow\pyzillow.py", line 82, in get_data
    raise ZillowError(int(response.findall('message/code')[0].text))
pyzillow.pyzillowerrors.ZillowError: <exception str() failed>

Same problem for me. For example, when retrieving this property, I see same exception as RobMulla

107 Allenhurst Ave, 07753

Having the same issue where the zillow_data.get_deep_search_results is giving TypeError: str returned non-string (type dict) for some addresses. Has anyone found a workaround for this error?

I am having the same issue on Python 2.7.

Also having this issue on some addresses. Using Python 2.7