options

简介: 这篇文章描述了在使用modelscope库下载模型时遇到的`TypeError: __init__() got an unexpected keyword argument ‘allowed_methods’`错误,并提供了通过升级`urllib3`库来解决该错误的方案。

TypeError: init() got an unexpected keyword argument ‘allowed_methods’

2023-11-03 00:09:32,463 - modelscope - INFO - PyTorch version 2.0.1+cu117 Found.
2023-11-03 00:09:32,467 - modelscope - INFO - Loading ast index from C:\Users\Admin.cache\modelscope\ast_indexer
2023-11-03 00:09:32,582 - modelscope - INFO - Loading done! Current index file version is 1.8.1, with md5 a46873d50b184c3b12f04f6dd0884717 and a total number of 893 components indexed
2023-11-03 00:09:34,210 - modelscope - INFO - Use user-specified model revision: v1.1.0
Traceback (most recent call last):
File “E:\Big_AI\l2VGen-XL\main.py”, line 4, in
pipe = pipeline(task=“image-to-video”, model=‘damo/Image-to-Video’, model_revision=‘v1.1.0’, device=‘cuda:0’)
File “D:\Anaconda3\envs\human\lib\site-packages\modelscope\pipelines\builder.py”, line 106, in pipeline
model = normalize_model_input(
File “D:\Anaconda3\envs\human\lib\site-packages\modelscope\pipelines\builder.py”, line 33, in normalize_model_input
model = snapshot_download(
File “D:\Anaconda3\envs\human\lib\site-packages\modelscope\hub\snapshot_download.py”, line 149, in snapshot_download
http_get_file(
File “D:\Anaconda3\envs\human\lib\site-packages\modelscope\hub\file_download.py”, line 282, in http_get_file
retry = Retry(
TypeError: init() got an unexpected keyword argument ‘allowed_methods’

一、前言

在modelscope下载模型的时候报错
在这里插入图片描述

二、原因

urllib3版本低,升级一下就好

pip install urllib3 --upgrade
相关文章
|
1月前
|
Java Spring
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
这篇文章提供了解决Spring Initializr网站初始化失败问题的方法,包括检查URL、网络和代理设置。
成功解决Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings
|
2月前
|
jenkins 持续交付 算法框架/工具
environment与options
environment与options
23 7
ValidationError: Invalid options object. Dev Server has been initialized using an options object tha
ValidationError: Invalid options object. Dev Server has been initialized using an options object tha
|
4月前
|
Java Spring
Initialization failed for 'https://start.spring.io' Please check URL, network and proxy settings.
Initialization failed for 'https://start.spring.io' Please check URL, network and proxy settings.
793 0
|
9月前
|
JSON 数据格式
axios.post请求出错:Request header field content-type is not allowed by Access-Control-Allow-Headers in……
axios.post请求出错:Request header field content-type is not allowed by Access-Control-Allow-Headers in……
|
应用服务中间件 API nginx
解决跨域问题 Response to preflight request doesn't pass access control check
解决跨域问题 Response to preflight request doesn't pass access control check
11040 1
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
成功解决TypeError: __init__() got an unexpected keyword argument 'serialized_options'
|
Web App开发 JavaScript 安全
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
205 0
Please open the about:config page and disable the "security.fileuri.strict_origin_policy" option
You have to specify ‘-keep‘ options for the shrinking step
You have to specify ‘-keep‘ options for the shrinking step
68 0