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
相关文章
|
5月前
|
jenkins 持续交付 算法框架/工具
environment与options
environment与options
39 7
|
6月前
|
前端开发 对象存储 数据安全/隐私保护
阿里云前端直传has been blocked by CORS policy: Response to preflight request doesn‘t pass access control
阿里云前端直传has been blocked by CORS policy: Response to preflight request doesn‘t pass access control
665 2
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
|
7月前
|
JavaScript 前端开发
has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple values ‘
has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple values ‘
151 0
|
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……
|
JavaScript Java 应用服务中间件
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
2014 0
Vue 跨域问题 的几种解决办法 (No ‘Access-Control-Allow-Origin‘ header is present on the requested resource)
|
应用服务中间件 API nginx
解决跨域问题 Response to preflight request doesn't pass access control check
解决跨域问题 Response to preflight request doesn't pass access control check
11549 1
|
前端开发 JavaScript
ajax请求的重定向处理--Request header field x-requested-with is not allowed by Access-Control-Allow-Header
ajax请求的重定向处理--Request header field x-requested-with is not allowed by Access-Control-Allow-Header
487 0
You have to specify ‘-keep‘ options for the shrinking step
You have to specify ‘-keep‘ options for the shrinking step
77 0
|
前端开发 数据可视化 Java
报错:跨域问题解决 No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
报错:跨域问题解决 No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
1290 0