Quotes.py change

Would it be possible to add better error handling into quotes.py?

I just tried to pull historical quotes for a ticker where in that time period it was empty and received the following error:

File "C:\Users\~~~~~~~\AppData\Local\Programs\Python\Python38\lib\site-packages\alpaca\data\models\quotes.py", line 48, in __init__
    for key, val in raw_data.items()
AttributeError: 'NoneType' object has no attribute 'items'

Which I’m assuming is the direct result of there not being any quotes for that ticker in the given time period (btw ticker is ‘AAC’ and the time period is start = 2021-03-09 00:00:00, end = 2021-03-10 00:00:00)
(edit: I should say it steps through the day 1 hour at a time so it isn’t the entire time period that had no quotes, just one of the market hours.)

But this could be much more graceful instead of dumping an error, just handle the error within quotes.py and return a null or another object to indicate that it was an empty response.

I can obviously handle the error downstream but I figure this error is something that should be handled upstream…

I’m not the one building this codebase so up to you all but just a thought.