不能使用带有str模式的LOCALE标志

时间:2016-12-25 10:42:15

标签: python-3.x xlwt

python ReadTF_mod.py train.csv
WARNING:tensorflow:From ReadTF_mod.py:124 in <module>.: initialize_all_variables
(from tensorflow.python.ops.variables) is deprecated and will be removed after
2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
WARNING:tensorflow:From ReadTF_mod.py:124 in <module>.: initialize_local_variabl
es (from tensorflow.python.ops.variables) is deprecated and will be removed afte
r 2017-03-02.
Instructions for updating:
Use `tf.local_variables_initializer` instead.
Done training, epoch reached
c
0.0
Epoch: 0001 cost= 0.000000000
Optimization Finished!
TEST BLOCK!
filename_queue_test
filename_queue_test end
Tensor("shuffle_batch_1:0", shape=(1379, 57), dtype=float32)
file print
^C

我正在尝试学习如何创建xls,编辑xls,或者删除python上的neccesary。我在这方面遇到了很多麻烦,因为网上的每个教程都没有提到我应该在Workbook之前加上xlwt,但我现在已经弄明白了。问题是,当我运行这段代码时,我得到一个错误,它表示&#34; ValueError:不能使用具有str模式的LOCALE标志&#34;我甚至都不知道这意味着什么......它是什么,我该如何解决?

2 个答案:

答案 0 :(得分:3)

tablib和Python 3.6存在一个已知问题,看起来它将在下一版本中得到解决。

目前,我的工作只是降级为python 3.5.2

答案 1 :(得分:0)

我遇到了类似的问题,我通过将系列更改为“str”数据类型来解决它。 df.astype("str") 也不确定为什么要尝试将文件另存为“self,example.xls”。你能不能按原样打印整个错误。