Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import at all #4

Open
android2221 opened this issue Jul 24, 2015 · 19 comments
Open

Can't import at all #4

android2221 opened this issue Jul 24, 2015 · 19 comments

Comments

@android2221
Copy link

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?

@hanneshapke
Copy link
Owner

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.

@android2221
Copy link
Author

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!

@tsumuel
Copy link

tsumuel commented Sep 11, 2015

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

@hanneshapke
Copy link
Owner

@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
Copy link
Owner

@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.

@tsumuel
Copy link

tsumuel commented Sep 13, 2015

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

@hanneshapke
Copy link
Owner

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

@hanneshapke
Copy link
Owner

@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
Copy link
Owner

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

@hanneshapke
Copy link
Owner

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

@tsumuel
Copy link

tsumuel commented Sep 16, 2015

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

@hanneshapke
Copy link
Owner

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?

@tsumuel
Copy link

tsumuel commented Sep 16, 2015

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. :)

@hanneshapke
Copy link
Owner

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

@darya-a
Copy link

darya-a commented Nov 20, 2015

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

@darya-a
Copy link

darya-a commented Nov 20, 2015

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

@hanneshapke
Copy link
Owner

@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!

@Arko2016
Copy link

@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.

@hanneshapke
Copy link
Owner

hanneshapke commented Jun 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants