Closed dbogatic closed 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.
Solved. It was an issue with reading .env. It is all working now.
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.