mattlisiv / newsapi-python

A Python Client for News API
MIT License
375 stars 130 forks source link

Issue with endpoint #69

Closed dbogatic closed 2 years ago

dbogatic commented 3 years ago

When I type this code:

btc_headlines = newsapi.get_everything(q="bitcoin", language="en", page_size=100,sort_by="relevancy") btc_articles = btc_headlines["articles"] btc_articles[0]

I get error:

TypeError: expected string or bytes-like object

Could you please advise what could be the issue? Thanks.

Note: This happens on Macbook Pro M1. On Intel Mac it works fine.

dbogatic commented 2 years ago

Solved. It was an issue with reading .env. It is all working now.