Error when fetching features

I am able to get the data, the model and the featureset. But when I try to load the features, I get an error. From the error message, it seems as though layer.get_features("transaction_features") is capturing just the first letter of the name, as it shows that Name: t cannot be found. The entire error message is copied below.

ArrowKeyError                             Traceback (most recent call last)
~/Develop/layer/lib/python3.8/site-packages/layer/ in fetch_features(self, names)
   1325         try:
-> 1326             table = self._flight_client.do_get(
   1327                 flight.Ticket(

~/Develop/layer/lib/python3.8/site-packages/pyarrow/_flight.pyx in pyarrow._flight.FlightClient.do_get()

~/Develop/layer/lib/python3.8/site-packages/pyarrow/_flight.pyx in pyarrow._flight.check_flight_status()

~/Develop/layer/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowKeyError: gRPC returned not found error, with message: Feature set not found. Name: t. Client context: IOError: Server never sent a data message. Detail: Internal. gRPC client debug context: {"created":"@1625679956.799862914","description":"Error received from peer ipv4:","file":"/opt/vcpkg/buildtrees/grpc/src/9d5d76bc12-fad544a798.clean/src/core/lib/surface/","file_line":1061,"grpc_message":"Feature set not found. Name: t","grpc_status":5}

During handling of the above exception, another exception occurred:

LayerClientException                      Traceback (most recent call last)
/tmp/ipykernel_28007/ in <module>
----> 1 layer_features = layer.get_features("transaction_features")
      2 layer_features

~/Develop/layer/lib/python3.8/site-packages/layer/ in get_features(names)
    156     config = _asyncio_run_in_thread(ConfigManager().refresh())
    157     with LayerClient(config.client, logger).init() as client:
--> 158         return client.data_catalog.fetch_features(names)

~/Develop/layer/lib/python3.8/site-packages/layer/ in fetch_features(self, names)
   1333             return table.to_pandas()
   1334         except Exception as err:  # rethrow grpc errors from data-catalog
-> 1335             raise _from_grpc_error(err, "internal feature fetch error")
   1337     def fetch_dataset(self, name: str) -> "pandas.DataFrame":

LayerClientException: Feature set not found. Name: t


I have tried this with the titanic example as well and it gives the same results.

I am running layer version 0.6.7


Hi Eric, get_features takes a list, try layer.get_features(["transaction_features"]). This is why it was failing on the first letter, the SDK was treating it as the first item in the list.

I’ll look into making the error message more descriptive to prevent this from happening again.

Thank you! It works great now. Much appreciated.

1 Like