提交 83f6b01d 编写于 作者: G Gang Tao 提交者: GitHub

Merge pull request #3 from linxiaohui/master

fix for Python3
......@@ -40,7 +40,7 @@ def csvdata():
return json.dumps({error:
'You are not allowed to upload such a file.'})
else:
flist = [f.replace('./data/', '').replace('.csv', '')
flist = [f.replace('./data'+os.sep, '').replace('.csv', '')
for f in glob.glob('./data/*.csv')]
return json.dumps(flist)
......@@ -65,7 +65,7 @@ def getdata(dataname):
if headerOnly:
return jsonify(name=dataname, csv=csvfile.readline())
else:
return jsonify(name=dataname, csv=csvfile.read())
return jsonify(name=dataname, csv=csvfile.read().decode("UTF-8"))
@app.route('/ml/cls/<action>', methods=['GET'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册