pyzillow icon indicating copy to clipboard operation
pyzillow copied to clipboard

get_deep_search_results() throws TypeError, both arguments are unicode

Open ReddyKilowatt opened this issue 8 years ago • 10 comments

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

thanks

ReddyKilowatt avatar Apr 28 '16 20:04 ReddyKilowatt

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 [email protected] 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

hanneshapke avatar Apr 28 '16 20:04 hanneshapke

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.

ReddyKilowatt avatar Apr 29 '16 02:04 ReddyKilowatt

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 [email protected] 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 https://github.com/hanneshapke/pyzillow/issues/7#issuecomment-219153639

ReddyKilowatt avatar May 14 '16 16:05 ReddyKilowatt

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 [email protected] 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 https://github.com/hanneshapke/pyzillow/issues/7#issuecomment-219153639

ReddyKilowatt avatar May 15 '16 01:05 ReddyKilowatt

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 [email protected] 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 [email protected] 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 https://github.com/hanneshapke/pyzillow/issues/7#issuecomment-219153639

ReddyKilowatt avatar May 21 '16 02:05 ReddyKilowatt

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>

RobMulla avatar Aug 12 '16 18:08 RobMulla

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

107 Allenhurst Ave, 07753

js333031 avatar Aug 22 '16 23:08 js333031

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?

swysell avatar Oct 16 '16 17:10 swysell

I am having the same issue on Python 2.7.

chandlerzuo avatar Dec 04 '16 14:12 chandlerzuo

Also having this issue on some addresses. Using Python 2.7

fouisgras avatar Feb 16 '17 00:02 fouisgras