keras-yolo3
keras-yolo3 copied to clipboard
TypeError: unicode argument expected, got 'str'
Using TensorFlow backend.
Loading weights.
('Weights Header: ', 0, 2, 0, array([32013312]))
Parsing Darknet config.
Traceback (most recent call last):
File "convert.py", line 262, in
@hejie the test environment is Python 3.5.2, I guess your environment is Python2.7.
if your environment is Python2.7, you can change code :
line 10
import io
and
line 47
output_stream·=io.StringIO()
to
line 10
from io import BytesIO as StringIO
line 47
output_stream·= StringIO()
@zhoul14 worked for me, thanks!
@zhoul14 Thanks for the solution.
@hejie the test environment is Python 3.5.2, I guess your environment is Python2.7.
Make sure you use python3
If you need both python2 and python2 support you can/should opt for six.StringIO
import six
six.StringIO()
if your environment is Python2.7, you can change code : line 10
import io
and line 47output_stream·=io.StringIO()
to line 10
from io import BytesIO as StringIO
line 47output_stream·= StringIO()
I used this tip to solve a problem in the plugin to generate migrations for laravel in MySQL Workbench.
Thank you very much!