mohankumarpaluru / oracle-freetier-instance-creation

A script to create free instance
MIT License
164 stars 33 forks source link

An exception occurred while running the script NoOptionError #7

Closed gregvp00 closed 7 months ago

gregvp00 commented 7 months ago

_Hello, I've attempted to execute the script after manually installing the requirements (as they weren't installed automatically with setup_init.sh), and now I'm encountering this error:_

ubuntu@instance-20240329-1316:~/script/oracle-freetier-instance-creation$ python3 ./main.py Traceback (most recent call last): File "/usr/lib/python3.8/configparser.py", line 789, in get value = d[option] File "/usr/lib/python3.8/collections/init.py", line 898, in getitem return self.missing(key) # support subclasses that define missing File "/usr/lib/python3.8/collections/init.py", line 890, in missing raise KeyError(key) KeyError: 'user'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "./main.py", line 35, in OCI_USER_ID = config.get('DEFAULT', 'user') File "/usr/lib/python3.8/configparser.py", line 792, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'user' in section: 'DEFAULT'

Do you have any idea how to solve it? Thanks in advance :)

mohankumarpaluru commented 7 months ago

@gregvp00

This happens when the expected configuration option is missing from the configuration file.

check your oci_config file and see if it matches the sample_oci_config

mohankumarpaluru commented 7 months ago

Improved the handling of CONFIG errors in script,

Please try the latest code and reopen it if its still unclear or a different issue.