Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source does not support the use of html as the source entry #7631

Closed
2 tasks done
StringKe opened this issue Mar 9, 2023 · 8 comments
Closed
2 tasks done

source does not support the use of html as the source entry #7631

StringKe opened this issue Mar 9, 2023 · 8 comments
Labels
status/duplicate Duplicate issues

Comments

@StringKe
Copy link

StringKe commented Mar 9, 2023

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

source does not support the use of html as the source entry, the spliced file address is wrong!

The correct URL should be https://modelscope.oss-cn-beijing.aliyuncs.com/releases/v1.3/modelscope-1.3.1-py3-none-any.whl

➜ poetry lock
Updating dependencies
Resolving dependencies... (2.6s)

404 Client Error: Not Found for url: https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html/v1.3/modelscope-1.3.1-py3-none-any.whl
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.93.0"
uvicorn = { version = "^0.20.0", extras = ["standard"] }
modelscope = { version = "^1", extras = ["cv"], source = "modelscope" }

[[tool.poetry.source]]
name = "modelscope"
url = "https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html"
secondary = true
@StringKe StringKe added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Mar 9, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Mar 9, 2023

because

if not url.endswith("/"):
url += "/"

if you want to submit an MR then that's the bit that needs to change

@PabloEmidio
Copy link
Contributor

The solution would be something like:

if not (url.endswith("/") or url.endswith('html')):
    url += "/"

If anyone already have submitted anything untill tonigh, I'll purpose a PR with the changes and understand how could the tests be modify to attest this behavior.

@neersighted
Copy link
Member

Duplicate #6687.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2023
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Mar 9, 2023
@dimbleby
Copy link
Contributor

dimbleby commented Mar 9, 2023

I think not a duplicate of #6687

this issue is about download, not upload. The proposed solution in #6687 is to normalize the URL by adding a trailing slash: but poetry attempting that normalisation is exactly the cause of the bug here.

@neersighted
Copy link
Member

neersighted commented Mar 9, 2023

My bad, I had the wrong issue on the clipboard when closing. #6885 is what I meant to link/I thought I pasted; unless I'm mistaken, this is a clear duplicate of that issue.

@dimbleby
Copy link
Contributor

dimbleby commented Mar 9, 2023

ah yes, that does look duplicate.

gosh that's a lot of talk for an issue which I expect should be solved by removing two lines of code. Perhaps I should read through it and understand why I'm wrong...

@neersighted
Copy link
Member

The discussion mostly centers around how we should detect a file terminating a URL, as simply removing the appending of a trailing slash is likely to break existing users. I guess the other way to look at it is that they likely should not have depended on such a feature, and a one-time break is an improvement. In any case, feel free to weigh in there.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

4 participants