pyzillow icon indicating copy to clipboard operation
pyzillow copied to clipboard

Can't import at all

Open android2221 opened this issue 9 years ago • 19 comments

I'm unable to import 'ZillowWrapper' or 'GetDeepSearchResults'. I've tried installing both manually and from pip, both with and without sudo, and both in vagrant and on my local machine. Opening any python console including django shell yields the same thing. Is this current version still working?

from pyzillow import ZillowWrapper Traceback (most recent call last): File "", line 1, in ImportError: cannot import name ZillowWrapper

I've since removed and reinstalled to the same tune. Any idea what's going awry?

android2221 avatar Jul 24 '15 19:07 android2221

Hi android2221,

It looks like a problem with the import path. I have tried this piece of code and it worked for me:

from pyzillow import pyzillow
API_KEY="your-key-goes-here"
zillow_data = pyzillow.ZillowWrapper(API_KEY)
result = zillow_data.get_deep_search_results('1600 Pennsylvania Avenue NW', '20500')
data = pyzillow.GetDeepSearchResults(result)
print data.zillow_id

In my example the import is different. Let me know if that works for you.

hanneshapke avatar Jul 25 '15 09:07 hanneshapke

Ah good call. I've started to just use the regular zillow API but unfortunately their rules/regulations prevent me from accessing the data I need anyway. :(

thanks!

android2221 avatar Jul 25 '15 13:07 android2221

I this error as well as the error listed by Andriod2221. Any direction on a fix? Thanks :-)

File "C:\Python27\lib\site-packages\pyzillow\pyzillow.py", line 8, in from django.contrib.gis.geos import fromstr, error ImportError: cannot import name fromstr

tsumuel avatar Sep 11 '15 18:09 tsumuel

@tsumuel The lib currently uses a method of GeoDjango (from django.contrib.gis.geos import fromstr, error). I am working on a fix to make the package agnostic to Django.

hanneshapke avatar Sep 12 '15 19:09 hanneshapke

@tsumuel Please check out the updated repository with the removed Django dependency, Python 3.4 support and mocked tests. I have updated the pip package as well. The latest version is now 0.5.1

The latest update should fix your problem. Please give the package another try and let me know if you have any trouble. Any comments/suggestions are welcome.

hanneshapke avatar Sep 13 '15 07:09 hanneshapke

I've reinstalled with new package (0.5.1). At first the install would not complete...I tinkered and changed the version information in the code. It would then recognize the module but still not recognize name the wrapper etc... First Error Message:

from pyzillow import ZillowWrapper, GetDeepSearchResults

Traceback (most recent call last): File "<pyshell#38>", line 1, in from pyzillow import ZillowWrapper, GetDeepSearchResults ImportError: No module named pyzillow

Then after tinkering with code:

from pyzillow import ZillowWrapper, GetDeepSearchResults

Traceback (most recent call last): File "<pyshell#39>", line 1, in from pyzillow import ZillowWrapper, GetDeepSearchResults ImportError: cannot import name ZillowWrapper

tsumuel avatar Sep 13 '15 17:09 tsumuel

@tsumuel Let me try it out. I will get back to you today.

hanneshapke avatar Sep 13 '15 19:09 hanneshapke

@tsumuel Thank you for your patience. I have fixed this bug and increased the version to 0.5.4 (pip and github repo is updated).

Please update your pip package with pip install --upgrade pyzillow Please also note that the syntax has slightly changed now. In your python script, import the classes via from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults

I have tested the code in a small sample project and it worked for me. Let me know if you have any further problems.

hanneshapke avatar Sep 13 '15 20:09 hanneshapke

Haha, there seems to be an issue now with Python 2.7. Everything works fine on 3.4.

hanneshapke avatar Sep 13 '15 21:09 hanneshapke

All tests have now passed Travis CI. The latest version is 0.5.5.

hanneshapke avatar Sep 13 '15 21:09 hanneshapke

Thanks. I use 2.7 with Anaconda as well. The module still doesn't exist according to IDLE.

This is what I run:

from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults

address = '10610 S 48th St Unit 1096' zipcode = '85044'

zillow_data = ZillowWrapper('my key') deep_search_response = zillow_data.get_deep_search_results(address, zipcode) result = GetDeepSearchResults(deep_search_response)

result.zillow_id

This is the error:

from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults ImportError: No module named pyzillow.pyzillow

tsumuel avatar Sep 16 '15 16:09 tsumuel

I am not sure what The module still doesn't exist according to IDLE. means. Can you see the latest version 0.5.5 in pip?

hanneshapke avatar Sep 16 '15 16:09 hanneshapke

I have upgraded via pip and reinstalled without success. The module doesn't exist means that python still doesn't recognize it as presented in the ImportError listed in the message. I can see it in my site-packages. Not sure but I wanted to share.

Thanks for looking into the issues. :)

tsumuel avatar Sep 16 '15 16:09 tsumuel

I think you are missing the correct python path. I used your small code in a simple app and it worked fine after I set export PYTHONPATH=$PYTHONPATH:/Users/test_user/.virtualenvs/test_pyzillow/lib/python2.7/site-packages in my bash

hanneshapke avatar Sep 16 '15 19:09 hanneshapke

Is there a way to access the listing price? I could not find it among the attributes of the GetUpdatedPropertyDetails.

darya-a avatar Nov 20 '15 07:11 darya-a

I added 'price':'price' to attribute_mapping in GetUpdatedPropertyDetails. I can access the price as an attribute now. Thanks for the module.

darya-a avatar Nov 20 '15 07:11 darya-a

@darya-a that is great!

Can you please create a pull request with your updates so that others can access the pricing data too? Feel free to add you to the list of contributors. Thank you!

hanneshapke avatar Nov 20 '15 08:11 hanneshapke

@hanneshapke ,

Thanks for the module, worked great for me. However, is there a limitation( about 1000 records) that can be fetched from zillow API ? I need to pull a lot more than 1000 records.

Arko2016 avatar Jun 18 '17 21:06 Arko2016

Zillow offers a paid API access which doesn't have a limit of 1k records.


Hannes Hapke p: +1-503-425-9586 t: @hanneshapke w: hanneshapke.github.io

For secure messages, please use this pgp key: http://bit.ly/1EJhUxJ

On Sun, Jun 18, 2017 at 2:41 PM, Arko [email protected] wrote:

@hanneshapke https://github.com/hanneshapke ,

Thanks for the module, worked great for me. However, is there a limitation( about 1000 records) that can be fetched from zillow API ? I need to pull a lot more than 1000 records.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hanneshapke/pyzillow/issues/4#issuecomment-309304806, or mute the thread https://github.com/notifications/unsubscribe-auth/ABLXg6m9oPACRz9I2MAL0w9to9725j2zks5sFZmKgaJpZM4FfZ18 .

hanneshapke avatar Jun 19 '17 02:06 hanneshapke