test-fullautomation / robotframework-robotlog2db

2 stars 1 forks source link

selftest failed during build job 553562 #56

Closed HolQue closed 1 year ago

HolQue commented 1 year ago

Something went wrong with database application

apertis:selftest AttributeError: 'PosixPath' object has no attribute 'strip'

osd6:selftest AttributeError: 'PosixPath' object has no attribute 'strip'

windows:selftest AttributeError: 'WindowsPath' object has no attribute 'strip'

Log:

[test trigger] : Subprocess ROBOT executor returned 0

Writing testresults to database

Now executing: -m RobotLog2DB

Traceback (most recent call last):
  File "C:\Program Files\RobotFramework\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\RobotFramework\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\__main__.py", line 17, in <module>
    RobotLog2DB()
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 1379, in RobotLog2DB
    process_suite(db, result.suite, _tbl_test_result_id, metadata_info, dConfig)
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 811, in process_suite
    process_suite(db, subsuite, _tbl_test_result_id, root_metadata,
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 811, in process_suite
    process_suite(db, subsuite, _tbl_test_result_id, root_metadata,
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 811, in process_suite
    process_suite(db, subsuite, _tbl_test_result_id, root_metadata,
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 852, in process_suite
    if cmpt_path in normalize_path(_tbl_file_name):
  File "C:\Program Files\RobotFramework\python39\lib\site-packages\RobotLog2DB\robotlog2db.py", line 1137, in normalize_path
    if sPath.strip()=='':
AttributeError: 'WindowsPath' object has no attribute 'strip'
Successfully connected to: robfwaiost@www-app.hi.de.bosch.com
Append to existing test execution result for variant 'BIOS_Windows' - version '2749807' - UUID '655691f6-9b07-4828-acb5-d6099a3fde0e'.

[test trigger] : Subprocess database executor returned 1
HolQue commented 1 year ago

Error handling is missing in robotlog2db.py:

def normalize_path(sPath):

   if sPath.strip()=='':
      return ''

Expected:

test-fullautomation commented 1 year ago

to be check if this is a side-effect of the full disk end of last week. Should not reappear with new builds.

... After check: error should be not related to full disk issue. Space if available, mysqld was restarted.

test-fullautomation commented 1 year ago

@ngoan1608 : please check

ngoan1608 commented 1 year ago

Hi Holger,

Thank you for your observation! I have fixed it in PR #57 .

Please help to review and give your feeling about it.

Thank you, Ngoan

test-fullautomation commented 1 year ago

solved and already merged with #57