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

Update core.py #161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update core.py #161

wants to merge 1 commit into from

Conversation

54kggo
Copy link

@54kggo 54kggo commented Dec 24, 2024

在使用duckdb的时候,发现oss://xxx/xxx.xx形式格式,总是找不到文件。调试发现,在调用ossfs的info方法的时候,会进入到fsspec的父类AbstractFileSystem中的info方法中。如果传入原始输入的path,会出现明明获得了文件信息,但是执行[o for o in out if o["name"].rstrip("/") == path]这一行的时候,找不到文件,从而返回错误的文件信息,进而读不到文件。 ossfs的info方法中,已经获得了去除协议头和正斜杠的norm_path,把其传入AbstractFileSystem中的info方法中,可以获得正确的结果

在使用duckdb的时候,发现oss://xxx/xxx.xx形式格式,总是找不到文件。调试发现,在调用ossfs的info方法的时候,会进入到fsspec的父类AbstractFileSystem中的info方法中。如果传入原始输入的path,会出现明明获得了文件信息,但是执行[o for o in out if o["name"].rstrip("/") == path]这一行的时候,找不到文件,从而返回错误的文件信息,进而读不到文件。
ossfs的info方法中,已经获得了去除协议头和正斜杠的norm_path,把其传入AbstractFileSystem中的info方法中,可以获得正确的结果
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.

1 participant