0
你能幫我把這個轉換成python 3.5嗎?我試過了,但不起作用。我做了以下步驟:將表單Python 2轉換爲Python 3時出現錯誤
我更改包的MD5到hashlib
我改變所有的
id = md5.new("%s"%str(clf.get_params())).hexdigest()
到id = hashlib.md5(("%s"%str(clf.get_params())).encode('utf-8')).hexdigest()
,但我仍然有索姆問題,當我把一個目錄到這些參數
save_preds="",
save_params=""
save_test_only=""
clf_name="XX"
我有如下因素的錯誤,當我把在thise參數的東西:
TypeError: a bytes-like object is required, not 'str'
請在這裏看到的代碼:
感謝,
CDK