如何阅读“.owl”来自天蓝色的 blob 存储
我必须将我的项目转移到 databricks。我的项目要求我读取“.owl”扩展名的本体文件。我正在使用 owlready2 包来读取 .owl 文件。
但我无法从 blob 存储 读取 owl 文件。
我尝试过
- 使用
request.get("azure file url")
但这会引发错误 - “指定的资源不存在”。 - owlready2.get_ontology("azure file url") 但这失败并显示错误 - “HTTP 错误 404:指定的资源不存在。PS
寻找从 blob 存储中读取 owl 文件的方法。
I have to transfer my project to databricks. My project requires me to read ontology files of ".owl" extension. I am using owlready2 package for reading .owl files.
But I am unable to read the owl file from blob storage.
I have tried
- using
request.get("azure file url")
but this to throws error saying - "The specified resource does not exist". - owlready2.get_ontology("azure file url") but this fails with error saying - "HTTP Error 404: The specified resource does not exist.
PS : I am taking the "azure file url" from below :
Looking to find away to read owl files from blob storage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到此错误的原因是因为您尝试读取的 blob 位于“私有”blob 容器中(即不允许公共读取访问)。
为您尝试以至少“读取”权限读取的 blob 创建共享访问签名 (SAS),并在代码中使用 SAS URL。要创建 SAS,请单击屏幕截图中显示的“生成 SAS”按钮。
要了解有关容器 ACL 的更多信息,请参阅此链接: https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl。
要了解有关共享访问签名的更多信息,请参阅此链接:https://learn.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature。
The reason you are getting this error is because the blob you are trying to read is in a "private" blob container (i.e. public read access is not allowed).
Create a Shared Access Signature (SAS) for the blob you're trying to read with at least "Read" permission and use the SAS URL in your code. To create a SAS, click on "Generate SAS" button shown in your screenshot.
To learn more about container ACL, please see this link: https://learn.microsoft.com/en-us/rest/api/storageservices/get-container-acl.
To learn more about Shared Access Signature, please see this link: https://learn.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature.