JiaLiangC commented on PR #1163:
URL: https://github.com/apache/bigtop/pull/1163#issuecomment-1734958498
@guyuqi
I am doing an upgrade to Python3 for Ambari and its related components, and
I have encountered this problem.
Here, the issue is actually because all Python code for Ranger is executed
in Python2. Therefore, if the Ranger db_setup.py script was previously run
using Python2 in the system, it would not throw an error.
This is because `subprocess.Popen(command, stdout = subprocess.PIPE)`
returns a str in Python2, but returns bytes in Python3.
So, if you use a Python3 script to execute db_setup.py, modifying it to
`(key, _, value) = line.decode('utf8').partition('=')` is good. However, there
are many places where similar subprocess.Popen code exists, and all have
encoding issues.
All Python scripts for Ranger are based on Python2, so upgrading them all
would be a better approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]