DbBot icon indicating copy to clipboard operation
DbBot copied to clipboard

AttributeError: 'TotalStatistics' object has no attribute 'all'

Open rhl07 opened this issue 3 years ago • 2 comments

Issue found not able to move ahead.

(Robot) C:\Users\Rahul.Mangal>python -m dbbot.run E:/routput.xml
Traceback (most recent call last):
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\site-packages\dbbot\run.py", line 51, in <module>
    DbBot().run()
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\site-packages\dbbot\run.py", line 41, in run
    self._parser.xml_to_db(xml_file)
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\site-packages\dbbot\reader\robot_results_parser.py", line 51, in xml_to_db
    self._parse_suite(test_run.suite, test_run_id)
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\site-packages\dbbot\reader\robot_results_parser.py", line 116, in _parse_suite
    self._parse_suite_status(test_run_id, suite_id, suite)
  File "C:\Users\Rahul.Mangal\.conda\envs\Robot\lib\site-packages\dbbot\reader\robot_results_parser.py", line 125, in _parse_suite_status
    'passed': suite.statistics.all.passed,
AttributeError: 'TotalStatistics' object has no attribute 'all'

rhl07 avatar Jun 25 '21 06:06 rhl07

How to fix this issue? I've encountered a similar issue.

AttributeError: 'TotalStatistics' object has no attribute 'all'

huyle-anh avatar Apr 25 '24 15:04 huyle-anh

The issue stems from the disparities and incompatibilities between Python versions. To fix them on my system, I used Python version 3.8 compiled from the source.

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
$ python3 -V
Python 3.8.19
$ pip3 -V
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

huyle-anh avatar Apr 26 '24 09:04 huyle-anh