deploy manifest errs when give a directory containing a manifest
还没有人认领这个 Issue。
评估
调研方向
从 rsconnect/main.py 中的 deploy_manifest() 开始,然后跟踪 rsconnect/bundle.py 中的 default_title_from_manifest() 和 read_manifest_file()。比较 manifest 验证后 file 和 file_name 的使用方式,并确认 rsconnect deploy manifest model 和直接的 manifest 路径都能在不出现目录错误的情况下完成。
由索引模型根据 Issue 内容生成。
描述
The help for deploy manifest reads:
Usage: rsconnect deploy manifest [OPTIONS] FILE
Deploy content to Posit Connect, Posit Cloud, or shinyapps.io using an
existing manifest.json file. The specified file must either be named
"manifest.json" or refer to a directory that contains a file named
"manifest.json".
However, when providing a directory that contains a manifest.json, an error results.
Traceback (most recent call last):
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/main.py", line 108, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/main.py", line 1119, in deploy_manifest
kwargs["title"] = title or default_title_from_manifest(file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/bundle.py", line 744, in default_title_from_manifest
source_manifest, _ = read_manifest_file(file)
^^^^^^^^^^^^^^^^^^^^^^^^
File "BASE_DIR/env/lib/python3.11/site-packages/rsconnect/bundle.py", line 757, in read_manifest_file
with open(manifest_path, "rb") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: 'model'
Internal error: [Errno 21] Is a directory: 'model'
Providing the path to the manifest.json works.
# error
rsconnect deploy manifest model
# no error
rsconnect deploy manifest model/manifest.json
Using rsconnect-python 1.23.0.
The manifest is correctly identified:
rsconnect.bundle.validate_manifest_file("model")
#> 'model/manifest.json'
However, in deploy_manifest(), we rewrite the incoming file to file_name but do not consistently use that variable.
- 主要语言
- Python
- 星标
- 37
- 派生
- 28
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 7
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
posit-dev/rsconnect-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
posit-dev/rsconnect-python#786 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 62/100
posit-dev/rsconnect-python#543 · 2 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
posit-dev/rsconnect-python#513 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
posit-dev/rsconnect-python#178 ·
-
难度 3/5 1-2 天 新手友好度 58/100
posit-dev/rsconnect-python#855 ·
查看 posit-dev/rsconnect-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 86/100
browser-use/browser-use#5905 ·
-
type: enhancement
难度 2/5 1-3 小时 新手友好度 68/100
ynput/ayon-python-api#363 ·
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 88/100
modelscope/FunASR#3728 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
open-compass/opencompass#2655 ·