1

I am trying to build my first config.ini file for Python, but having issues using it in my script. I am attempting to use it with the JIRA module for work, so that's where I am hitting a snag. Before using a config file, when assigning a variable, it would look something like this:

var1 = issue.fields.customfield10000

After trying to get my config.ini working, it looks like this:

config = ConfigParser()
config.read('config.ini')

config_data = config['DEV']

var1 = issue.fields.config_data['item']

With this, I get the error:

'PropertyHolder' object has no attribute 'config_data'

Not really sure where to go from here, hope someone can help, thanks.

I have tried str(config_data['item'] and eval(config_data['item'] but both gave me similar errors.

accdias
  • 5,160
  • 3
  • 19
  • 31
cmcigas
  • 11
  • 2

1 Answers1

0

does this help? It worked for me. Change this:

config.read(config.ini)

to:

config.read("config.ini")
toyota Supra
  • 3,181
  • 4
  • 15
  • 19