Files
doc-exports/docs/modelarts/umn/modelarts_13_0199.html
Lai, Weijian 6aa966a79a ModelArts UMN 24.3.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lai, Weijian <laiweijian4@huawei.com>
Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
2024-11-02 09:04:52 +00:00

2.0 KiB

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 (/).