Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'str' object has no attribute 'options' #4

Open
ameyanatu opened this issue Nov 13, 2019 · 1 comment
Open

AttributeError: 'str' object has no attribute 'options' #4

ameyanatu opened this issue Nov 13, 2019 · 1 comment

Comments

@ameyanatu
Copy link

I have place the cfg file in my project directory with UTF-8 encoding and following is my python code

if name == 'main':
loc = r'C:\Projects\C360_Web\Framework\output.xml'
parsers = qcri.get_parsers(loc, cfg='qcri.cfg')
results = qcri.parse_results(parsers[0], loc)
conn = qcri.connect('', '', '', '', '')
qcri.import_results(conn, '
', results, attach_report=True)

However I am getting this error on get_parsers function. Am I doing something wrong ?

@MaZa78
Copy link

MaZa78 commented Nov 25, 2020

I have samekind of problem

import qcri
loc = r'c:/demo_robot/reports/output.xml'
parsers = qcri.get_parsers(loc, cfg='qcri.cfg') <--- HERE is the problem
results = qcri.parse_results(parsers[0], loc)
conn = qcri.connect('', '', '', '', '')
qcri.import_results(conn, '', results, attach_report=False)

It fails HERE and i am wondering what I am doing wrong.

Traceback (most recent call last):
File "update_test_results_to_alm.py", line 3, in
parsers = qcri.get_parsers(loc, cfg='qcri.cfg')
File "C:\Python38\lib\site-packages\qcri\application\importer.py", line 121, in get_parsers
avail_parsers = _load_parsers(cfg)
File "C:\Python38\lib\site-packages\qcri\application\importer.py", line 239, in _load_parsers
options = cfg.options('parsers')
AttributeError: 'str' object has no attribute 'options'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants