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

Fix a bug in checking local or remote file on Windows #499

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

dukesun99
Copy link
Contributor

This is a bug that I came across during playing with the conversation_with_web_browser_agent example on Windows.

The bug was that OpenAI cannot access the local URL path because it is passed to the API as URL but not base64 format. This is caused by this line. urllib somehow parse the local path "C:\Users\xx" with C as the scheme, so the first branch of the if is executed, which means the file is checked as a web URL.

Not a good enough solution for now to add an exists check before the scheme check, but please feel free to discuss a more proper way.

Copy link
Collaborator

@DavdGao DavdGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your fix. LGTM

@DavdGao DavdGao merged commit daa79e7 into modelscope:main Dec 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants