osc_cli can not work in mode with python 3.6.4
Opened this issue · 0 comments
yejr commented
my python version is 3.6.4:
[root@test1 ~]# python3 -V
Python 3.6.4
i install python in /usr/local.
when i run osc_cli with copy mode, but it can not work, the error message is:
[root@test1 ~]# osc_cli copy --socket=/data/mysql57/mysql.sock --mysql-user=root --mysql-password="" --database=sbtest --ddl-file-list=./foo.sql
Traceback (most recent call last):
File "/usr/local/bin/osc_cli", line 4, in <module>
__import__('pkg_resources').run_script('osc==0.0.1', 'osc_cli')
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 743, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1498, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.6/site-packages/osc-0.0.1-py3.6.egg/EGG-INFO/scripts/osc_cli", line 123, in <module>
main()
File "/usr/local/lib/python3.6/site-packages/osc-0.0.1-py3.6.egg/EGG-INFO/scripts/osc_cli", line 108, in main
cmd.validate_args()
File "/usr/local/lib/python3.6/site-packages/osc-0.0.1-py3.6.egg/core/commands/copy.py", line 227, in validate_args
file_obj.read().decode(charset)
AttributeError: 'str' object has no attribute 'decode'