What is the reason of "AttributeError" while placing market buy order?

import os
from binance.client import Client

client = Client(api_key, api_secret)

order = client.order_market_buy(

Error Mesaage: File “C:\Users\vlad_\anaconda3\lib\site-packages\binance\client.py”, line 135, in _generate_signature
m = hmac.new(self.API_SECRET.encode(‘utf-8’), query_string.encode(‘utf-8’), hashlib.sha256)

AttributeError: ‘NoneType’ object has no attribute ‘encode’

Hello. I’m new to binance-api and tried creating market order on Spyder(python) but couldn’t figure out reason of this error. Anyone around who could help with this? Thanks

Obviously this means your code didn’t get a value for API_SECRET from env vars. Please do troubleshooting from cod perspective and find help in a python dev forum. This forum is for API usage only