StockHistoricalDataClient.get_stock_bars method returning no data

Hi all,

I am building a python app that needs to retrieve bar data for a given underlying stock but am having issues when talking to the StockHistoricalDataClient.get_stock_bars method. I believe I am sending properly-formatted “start” and “end” datetime strings but it is constantly throwing the exception: " ‘NoneType’ object has no attribute ‘items’" for every day in my loop.

My code is below. Any help anyone can provide would be great.

 for calendar_day in calendar_filters:
            market_open = calendar_day.open.replace(tzinfo=pytz.timezone('America/New_York'))
            market_open_formatted = market_open.strftime("%Y-%m-%d %H:%M:%S")
            market_close = calendar_day.close.replace(tzinfo=pytz.timezone('America/New_York'))
            market_close_formatted = market_close.strftime("%Y-%m-%d %H:%M:%S")
            
            #test = datetime.datetime(2016, 1, 12, tzinfo=pytz.timezone('America/New_York')).isoformat()
            
            stock_bars_request = StockBarsRequest(
                symbol_or_symbols=symbol,
                start=market_open_formatted,
                end=market_close_formatted,
                timeframe=TimeFrame(amount=1, unit=TimeFrameUnit.Day)
                )
            
            try:
                day_bars = self.data_client.get_stock_bars(request_params=stock_bars_request).df
                bars.append(day_bars)
            except Exception as e:
                print(f"Error while fetching data for {calendar_day.date}: {e}")