Closed kdelee closed 6 years ago
FYI this does NOT happen in python 2.X, this is something that arises in python 3.X because of changes in the relationship between byte strings and strings between 2.X and 3.X
I'm not an expert on this subject, but here is some info:
https://eli.thegreenplace.net/2012/01/30/the-bytesstr-dichotomy-in-python-3
Usually I follow the unicode sandwitch (for more info [1]) where inside the application code all data is string and when reading or outputting convert to bytest. That said the generated string can be then encoded, that should provide good result on Python 2 and 3, something like:
logfile.write(('******* %s *******' % (str(datetime.now()))).encode('utf-8'))
Specify type:
Bug severity (if applicable):
Description:
When running rho in a python 3.6 virtual environment, an error can be produced that does not block the scan, but is disconcerting.
Bug Report
Version of rho:
[caea38dadfd8bac42b41c8e05023dc8a0e0f6866 ] (master)
Expected behavior:
No tracebacks from python errors are produced by normal workflow.
Actual behavior:
At connection phase, the following error is produced:
(scan continues and is able to complete after this)
Steps to reproduce:
Install rho in a python3.6 virtual environment (including system-site-packages re: #512) Scan test-matrix machines (did not happen on only localhost/local hosted VM scan)
I'd talk to Elyezer about this, he has battled this type of python 3 issue before.
Environment information: