UnicodeDecodeError: 'utf-8' 编解码器无法解码位置 108 中的字节 0xd1:继续字节无效

问题描述

这是我的代码

import tensorflow_hub as hub
module_url = "C:/study/web_mystem_skipgram_500_2_2015.bin.gz"

# Import the Universal Sentence Encoder's TF Hub module
embed = hub.Module(module_url)

每当我运行此代码时,它都会出现以下错误

UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-7-92031fbf4749> in <module>
      2 
      3 # Import the Universal Sentence Encoder's TF Hub module
----> 4 embed = hub.Module(module_url)

D:\Users\anaconda3\lib\site-packages\tensorflow_hub\module.py in __init__(self,spec,trainable,name,tags)
    155     """
    156     self._graph = tf.compat.v1.get_default_graph()
--> 157     self._spec = as_module_spec(spec)
    158     self._trainable = trainable
.....
---> 78       self._read_buf = _pywrap_file_io.BufferedInputStream(
     79           self.__name,1024 * 512)
     80 

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd1 in position 108: invalid continuation byte

我在 tensorflow_hub 模块中找不到这样的问题解决方案; 那我该怎么办!请帮忙。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...