Help Center> ModelArts> Troubleshooting> APIs or SDKs> Error Occurred During Service Deployment After the Target Path to a File Downloaded Through a ModelArts SDK Is Set to a File Name
Updated on 2022-12-08 GMT+08:00

Error Occurred During Service Deployment After the Target Path to a File Downloaded Through a ModelArts SDK Is Set to a File Name

Symptom

A ModelArts SDK was used to download a file from OBS, and the target path was set to the file name. No error was reported in the local IDE, but an error occurred when the target AI application was deployed as a real-time service.

Sample code:

session.obs.download_file (obs_path, local_path)

The error message is as follows:

2022-07-06 16:22:36 CST [ThreadPoolEx] - /home/work/predict/model/customize_service.py[line:184] - WARNING: 4 try: IsADirectoryError(21, 'Is a directory'). update products failed!

Possible Causes

The target path (local_path) was incorrectly set in code.

Solution

Set local_path to a folder and ensure the folder name extension ends with a slash (/).