问题:

python使用transformers时报错:

1、

Unable to load vocabulary from file. Please check that the provided vocabulary is accessible and not corrupted.

无法从文件中加载词表。请检查所提供的词表是否可以访问并且没有损坏。

2、

Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96

Repo ID必须使用字母数字字符或者'-'、'_'、'...',禁止使用'--'和'...','-'和'...'不能作为名称的开始或结束,最大长度为96。

解决方法:

一开始以为是下载的文件损坏了,但是重新下载之后依旧报错。

在这里看到了一个解决方法,说只用更新一下即可:

pip install --upgrade transformers sentencepiece

不过尝试之后发现没用。

猜测并非因为文件损坏报错,而是因为无法访问导致的,这可能是由于中文路径的原因,遂将路径改为英文该错误消失。

又现了如下错误:

Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96

发现是因为在代码中不小心把文件名中的"-"写成了"_"将代码中的"_"全部改为"-"后该错误消失。

Unable to load vocabulary from file. Please check that the provided vocabulary is accessible and not相关推荐

  1. error: Unable to load contents of file list: '/Users/.../Products/Debug-appletvos/myapp.app/Info....

    Error: Build system information error: Unable to load contents of file list: '/Users/-/Products/Debu ...

  2. 排查 CI Unable to load the requested file

    今天将自己做的项目提到服务器上,本来信心满满的等着跑流程测试,结果配好路径后,一直报错: 顿时懵逼...于是开始了排查过程 1.首先想到的是文件权限的问题,结果查看目录都是755, 文件都是644,不 ...

  3. iOS XCode 解决 Showing Recent Messages :-1: Unable to load contents of file list

    iOS XCode 解决 Showing Recent Messages

  4. Py_Initialize fails - unable to load the file system codec

    Py_Initialize fails - unable to load the file system codec https://stackoverflow.com/questions/56947 ...

  5. unable to load client certificate private key file

    解决方法可以跳过看最后!!!o( ̄︶ ̄)o 终端执行 openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MyPus ...

  6. 关于pycharm报错:Fatal Python error: Py_Initialize: unable to load the file system codec的解决

    先上pycharm报错: Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundE ...

  7. 出现 malformed or corrupted AST file: 'Unable to load module .pcm: module file out of date'错误

    iOS9出现以后,必须把Xcode6升级到iOS7了,但是今天用Xcode7打开之前Xcode6编写的项目,突然出现了这个问题 malformed or corrupted AST file: 'Un ...

  8. Unable to read the project file 'client.csproj'. Could not load file or assembly 'Microsoft.Build.En

    错误详细信息: Unable to read the project file 'client.csproj'. Could not load file or assembly 'Microsoft. ...

  9. Unable to load weights from pytorch checkpoint file

    使用pytorch加载bert预训练模型时,出现OSError:Unable to load weights from pytorch checkpoint file.if you tried to ...

最新文章

  1. vs2015改程序名字
  2. kdevelp 导入makefile工程
  3. Spring Data MongoDB中的审核实体
  4. uushare新增类似美味(del.icio.us)的书签服务
  5. 关于Web面试的基础知识点--Html+Css(三)
  6. 【LeetCode】——根据前序和中序遍历构建二叉树
  7. 若在一分页存储管理系统中,某作业的页表如表所示。已知页面大小为 1024字节,试将逻辑地址 1011,2148,3000,4000,5012转化为相应的物理地址。
  8. no module named ‘cv2’解决办法
  9. 潍坊学院c语言上机题库,参编学校_C语言程序设计上机指导与同步训练(刘迎春、张艳霞)_pdf_大学课件预览_高等教育资讯网...
  10. unity内部图集切割
  11. oracle 中的or,oracle语句查询 or和and
  12. Unix/Linux环境C编程入门教程(14) Mandriva LinuxCCPP开发环境搭建
  13. 铁路现代化技术系统整理(二)之TMIS
  14. java 向路由器发送报文_9.IP选路 - loda0128的个人空间 - OSCHINA - 中文开源技术交流社区...
  15. 产品需求边界确定的探索
  16. docker方式运行SRS
  17. winform 分页打印实例
  18. PDF编辑_隐私条款
  19. 油烟净化器如何判断质量好坏?
  20. 马云、马化腾要合作了?阿里传出新消息,或将支持微信支付

热门文章

  1. 无损分解和保持依赖分解我懂了吗
  2. echarts 与 百度地图bmap结合系列: 如何设置地图缩放级别和监听缩放事件
  3. k型热电偶材料_K型热电偶规格参数及使用性质.doc
  4. 2020-08-06词汇
  5. java判断是否文件夹_java中怎么判断是否文件夹
  6. java海伦公式求三角形面积_海伦公式求三角形面积出错求教
  7. actionscript3.0视频教程合集
  8. 神州数码ERP电子行业解决方案
  9. php微信app支付教程,PHP APP端微信支付的方法
  10. 家用计算机维护,家用电脑日常维护技巧