如何阅读“.owl”来自天蓝色的 blob 存储

发布于 2025-01-10 11:04:45 字数 550 浏览 1 评论 0原文

我必须将我的项目转移到 databricks。我的项目要求我读取“.owl”扩展名的本体文件。我正在使用 owlready2 包来读取 .owl 文件。

但我无法从 blob 存储 读取 owl 文件。

我尝试过

  • 使用 request.get("azure file url") 但这会引发错误 - “指定的资源不存在”。
  • owlready2.get_ontology("azure file url") 但这失败并显示错误 - “HTTP 错误 404:指定的资源不存在。PS

:我从下面获取“azure file url”: 网址来自这里

寻找从 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 :
url from here

Looking to find away to read owl files from blob storage.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千秋岁 2025-01-17 11:04:45

您收到此错误的原因是因为您尝试读取的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文