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

'Client' object has no attribute 'business' #79

Open
forest44 opened this issue Apr 18, 2020 · 3 comments
Open

'Client' object has no attribute 'business' #79

forest44 opened this issue Apr 18, 2020 · 3 comments

Comments

@forest44
Copy link

Hello,

I try the following python code copied from this site:
from yelp.client import Client

MY_API_KEY = 'xxxx'

client = Client(MY_API_KEY)
business_response = client.business.get_by_id('yelp-san-francisco')

Then, I have the error "'Client' object has no attribute 'business'".
Any idea why the given code doesn't work?
Thanks for your help.

@theRealDavidDavis
Copy link

I have the exact same issue.

@forest44
Copy link
Author

Finally, I use this solution:
url = 'https://api.yelp.com/v3/businesses/search'
API_KEY = xxxx
headers = {'Authorization': f"Bearer {API_KEY}"}
categories = ['french', 'chinese', 'japanese', 'italian', 'indian']

for i, category in enumerate(categories):
params = {'location': location, 'limit': 50, 'categories': category}
resp = requests.get(url, headers=headers, params=params)

@np3xpu
Copy link

np3xpu commented Oct 20, 2020

Heh, may want to fork and start something anew, project looks dead to me.

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

3 participants