VS Code通过SSH远程连接服务器的Error: Running the contributed command: ‘_workbench.downloadResource‘ failed解决

VS Code通过SSH远程连接服务器的Error: Running the contributed command: ‘_workbench.downloadResource‘ failed解决

@1. 问题描述
@2. 解决方法

1.问题描述

此前,本人参考网上教程在VS Code中配置了“Remote SSH”插件(比如这个教程),本人是在Windows中使用VS Code来连接远程的Linux服务器。但是今天使用遇到了问题Error: Running the contributed command: ‘_workbench.downloadResource’ failed,截图如下:

在这里插入图片描述

2.解决方法

(1) 删除Remote Server上的~/.vscode-server 可以在远程Linux服务器上执行rm -rf ~/.vscode-server指令
(2) 在本地的VS Code中再次尝试连接,毫无意外,这次依然是失败的。但是这一步会在远程服务器中生成~/.vscode-server/bin/xxx文件夹,此时可以看到一个名为vscode-server.tar.gz,截图如下:

在这里插入图片描述
(3) 上面的2d开头的文件夹称为Commit Id,现在利用Commit ID下载远程连接需要的文件。对于Stabe Version(在VS Code报错的的窗口中Ctrl+F搜索stable,有则为Stable Version)的Remote SSH插件,如下图,在“输出”窗口中Ctrl+F搜索“stable”。

在这里插入图片描述
(4) 然后使用这个链接:https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/stable下载所需文件,注意链接中的$COMMIT_ID这几个字符(注意$不要忘记)需要换成自己的,比如我的是2d23c42a936db1c7b3b06f918cde29561cc47cd6,那么此时我通过https://update.code.visualstudio.com/commit:2d23c42a936db1c7b3b06f918cde29561cc47cd6/server-linux-x64/stable就可以下载到我需要的文件。
对于Insider版本,通过https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/insider这个链接下载相应文件。

(5) 下载完毕后,将下载的文件upload到Remote Server的~/.vscode-server/bin/xxx文件夹下(注意: 这一步亲测在Remote Server上直接执行wget https://vscode.cdn.azure.cn/stable/$COMMIT_ID/vscode-server-linux-x64.tar.gz即可下载,这样就不用进行上传操作了),同时删除其他文件,最后再使用tar -xvf vscode-server-linux-x64.tar.gz --strip-components 1解压文件,具体如下图:

在这里插入图片描述
(6) 然后使用chmod +x node server.sh为node和server.sh添加可执行权限。

在这里插入图片描述

(7) 再次使用VS Code尝试链接,这一步会链接成功。

版权声明:本文为CSDN博主「ibless」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/ibless/article/details/118610776

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
python web_demo.py Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Traceback (most recent call last): File "/home/nano/THUDM/ChatGLM-6B/web_demo.py", line 5, in <module> tokenizer = AutoTokenizer.from_pretrained("/home/nano/THUDM/chatglm-6b", trust_remote_code=True) File "/home/nano/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 679, in from_pretrained return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs) File "/home/nano/.local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1804, in from_pretrained return cls._from_pretrained( File "/home/nano/.local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1958, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) File "/home/nano/.cache/huggingface/modules/transformers_modules/chatglm-6b/tokenization_chatglm.py", line 221, in __init__ self.sp_tokenizer = SPTokenizer(vocab_file, num_image_tokens=num_image_tokens) File "/home/nano/.cache/huggingface/modules/transformers_modules/chatglm-6b/tokenization_chatglm.py", line 64, in __init__ self.text_tokenizer = TextTokenizer(vocab_file) File "/home/nano/.cache/huggingface/modules/transformers_modules/chatglm-6b/tokenization_chatglm.py", line 22, in __init__ self.sp.Load(model_path) File "/home/nano/.local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 905, in Load return self.LoadFromFile(model_file) File "/home/nano/.local/lib/python3.10/site-packages/sentencepiece/__init__.py", line 310, in LoadFromFile return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg) RuntimeError: Internal: src/sentencepiece_processor.cc(1101) [model_proto->ParseFromArray(serialized.data(), serialized.size())]什么错误
07-22

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值