Hopsworks 3.0 RESTAPI Error

Greetings,

I installed Hopswork 3.0 locally and I got an error in the modeling part of the churn application you created.
Code :

X_train, X_val, X_test, y_train, y_val, y_test = feature_view.get_train_validation_test_split(
training_dataset_version = 1
)

Error :

RestAPIError: Metadata transaction error: (url: https://192.168.6.146/hopsworks-api/api/project/130/dataset/Projects%2Fpoc_churn%2Fpoc_churn_Training_Datasets%2Fchurn_feature_view_1_1%2Ftrain). Server response:
HTTP code: 400, HTTP reason: Bad Request, error code: 110018, error msg: Path not found, user msg:

->{ā€œtypeā€:ā€œrestApiJsonResponseā€,ā€œerrorCodeā€:200003,ā€œerrorMsgā€:ā€œAuthorization header not set.ā€}

[15:13] Şule AkƧay

python version == 3.10

Requirements :
hopsworks==3.0.5
ipykernel==6.23.1
pandas==1.5.3
matplotlib
seaborn==0.11.2
scikit-learn

I would be very grateful if you could help me.

Thank you very much.

Hi @cmlops,

Did you establish a connection to the feature store using hsfs.connection() or hopsworks.login()?

The error says that the API key you provided is empty or not correct, can you double check the connection setup code?

1 Like

I using hopsworks.login().Thank you very much.

Are you providing the api key using the api_key_value field in the login() method?
See the login method documentation: Login - Hopsworks Documentation

I got it, thank you.

1 Like

Hello,
I am getting this RestAPIError: Metadata operation error: (url: https://c.app.hopsworks.ai/hopsworks-api/api/variables/docker_base_image_python_version). Server response:
HTTP code: 401, HTTP reason: Unauthorized, body: bā€™{ā€œerrorCodeā€:320013,ā€œerrorMsgā€:ā€œAPI key not found in the databaseā€}', error code: 320013, error msg: API key not found in the database, user msg: error while trying to connect with enterprise account