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

Docs out of date #62

Open
chrisspen opened this issue Jun 6, 2022 · 1 comment
Open

Docs out of date #62

chrisspen opened this issue Jun 6, 2022 · 1 comment

Comments

@chrisspen
Copy link

The docs don't seem to match the codebase anymore, as almost none of the example work.

https://uszipcode.readthedocs.io/01-Usage-Example/index.html#searchengine-examples

>>> from uszipcode import SearchEngine
>>> search = SearchEngine(simple_zipcode=True)
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    zipSearch = SearchEngine(simple_zipcode=False)
TypeError: __init__() got an unexpected keyword argument 'simple_zipcode'

Could you please provide working examples of how to use the package?

@angietseng
Copy link

angietseng commented Jun 29, 2022

Same. When I ran one of the working samples (the Fuzzy city name and state name search one), I got an AttributeError: 'Session' object has no attribute 'scalars.' I got the error when I ran it on Jupyter Notebook. However, when I ran it on normal python environment, it worked perfectly. Please let me know how to resolve this issue. Thanks!

This is the example I ran:

from uszipcode import SearchEngine
search = SearchEngine(simple_or_comprehensive=SearchEngine.SimpleOrComprehensiveArgEnum.simple)
res = search.by_city_and_state("cicago", "il", returns=999)
print(res[0])

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

No branches or pull requests

2 participants