pbylicki / DbBot-SQLAlchemy

A tool for inserting Robot Framework test run results into SQL database using SQLAlchemy.
http://robotframework.org
Apache License 2.0
10 stars 11 forks source link

Encoding issue #4

Open lesnake opened 3 years ago

lesnake commented 3 years ago

Encoding issue due to binary characters in log.

File "/nfs/home/$USER/.local/lib/python2.7/site-packages/dbbot/reader/robot_results_parser.py", line 228, in _string_hash return sha1(string.encode()).hexdigest() if string else None UnicodeEncodeError: 'ascii' codec can't encode characters in position 711-712: ordinal not in range(128)

Solved using return sha1(string.encode('utf-8')).hexdigest() if string else None at line 227 of robot_results_parser.py