简体   繁体   中英

Why getting error config file not found in python for Oracle Cloud Infrastructure?

I am trying to connect OCI with Python API. I created start script to start the Oracle Cloud instance. But getting error " Could not find config file at {}, ". 在此处输入图像描述 在此处输入图像描述 Can someone help on this error, please? I am running python script in visual studio code . Thanks in advance.

Please take a closer look at the error message. This is the part to pay close attention to: 错误

Likely, the reason for the error is that the slashes in the path are facing two different directions / and \ . Please update your code to use only \ in the file path and see if this resolves the issue.

If this still does not resolve the issue, please check that you have a config file saved at the path defined in your code: C:\Users\samukku\.oci\config

The reason the config file isn't supplied is because it uses resource identifiers which need to be defined based on your tenancy and compartment.

Here please refer https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html for configuring the Config file.

Also refer https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/pythonsdk.htm this doc shall help in setting up the API if you missed out anything.

Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM