Cannot infer timezone when getting prices from usstock-minute zipline bundle

For some reason I’m getting a timezone error when getting prices for two sids, which share the same timezone, from the usstock-minute zipline bundle. Is this a bug? See example below.

get_prices(["usstock-minute"],
                    sids=["FIBBG000C0C3X9", "FIBBG000CX5677"],
                    start_date="2021-05-11",
                    end_date="2021-05-11",
                    fields=["Open", "High", "Low", "Close", "Volume"])

In security master you can see that both these sids share the same timezone:

quantrocket master get --sids FIBBG000C0C3X9 FIBBG000CX5677 | csvlook
| Sid            | Symbol | Exchange | Country | Currency | SecType |   Etf | Timezone         | Name                        | PriceMagnifier | Multiplier | Delisted | DateDelisted | LastTradeDate | RolloverDate |
| -------------- | ------ | -------- | ------- | -------- | ------- | ----- | ---------------- | --------------------------- | -------------- | ---------- | -------- | ------------ | ------------- | ------------ |
| FIBBG000C0C3X9 | PRPO   | XNAS     | US      | USD      | STK     | False | America/New_York | PRECIPIO INC                |           True |       True |    False |              |               |              |
| FIBBG000CX5677 | BTX    | XASE     | US      | USD      | STK     | False | America/New_York | BROOKLYN IMMUNOTHERAPEUTICS |           True |       True |    False |              |               |              |

Here’s the error

---------------------------------------------------------------------------
ParameterError                            Traceback (most recent call last)
<ipython-input-3-e83cf80f0eeb> in <module>
      1 from quantrocket import get_prices
      2 
----> 3 prices = get_prices(["usstock-minute"],
      4                              #universes="usstock-smallcap-debug",
      5                              sids=["FIBBG000C0C3X9", "FIBBG000CX5677"],

/opt/conda/lib/python3.8/site-packages/quantrocket/price.py in get_prices(codes, start_date, end_date, universes, sids, exclude_universes, exclude_sids, times, fields, timezone, infer_timezone, cont_fut, data_frequency)
    437 
    438         if len(timezones) > 1:
--> 439             raise ParameterError(
    440                 "cannot infer timezone because multiple timezones are present "
    441                 "in data, please specify timezone explicitly (timezones: {0})".format(

ParameterError: cannot infer timezone because multiple timezones are present in data, please specify timezone explicitly (timezones: America/New_York, America/Chicago)

After digging a little deeper I found that the issue was due to requesting prices for a date that had no prices and thus on line 427 of price.py when sids are pulled from list(prices.columns) and empty list is returned. As a result the call to download_master_file downloads the entire security master which in my case does contain securities from different timezones.

Hopefully this helps others.

Thank you, we’ll button that up.