You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Miles Granger (Jira)" <ji...@apache.org> on 2022/11/03 14:45:00 UTC
[jira] [Commented] (ARROW-17985) [Python][C++] Opaque error code ([code: 100]), when not setting region
[ https://issues.apache.org/jira/browse/ARROW-17985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628361#comment-17628361 ]
Miles Granger commented on ARROW-17985:
---------------------------------------
[~vroomerify] I'm a bit curious how {{region="auto"}} worked for you, or if that's a mistake?
I don't see it documented anywhere, and when trying locally with that I get the same error as saying {{region="foobar"}} which is
AWS Error [code 99]: Couldn't resolve host name
I'll make a PR to better document this, but on can use [resolve_s3_region |https://arrow.apache.org/docs/python/generated/pyarrow.fs.resolve_s3_region.html] to figure out the region of the bucket, or [S3FileSystem.from_uri |https://arrow.apache.org/docs/python/generated/pyarrow.fs.S3FileSystem.html#pyarrow.fs.S3FileSystem.from_uri] which is slightly better documented (what the URI can be) in the [R docs |https://arrow.apache.org/docs/r/articles/fs.html#uris]
> [Python][C++] Opaque error code ([code: 100]), when not setting region
> ----------------------------------------------------------------------
>
> Key: ARROW-17985
> URL: https://issues.apache.org/jira/browse/ARROW-17985
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Reporter: Vedant Roy
> Priority: Minor
>
> A few odd things are going on with the Python bindings:
> # Statefulness. I ran the following code:
> {code:java}
> import os
> import pyarrow.fs as arrow_fs
> def fs_():
> s3_fs = arrow_fs.S3FileSystem(
> access_key="<token>",
> secret_key="<token>",
> endpoint_override="<cloudflare r2 url>",
> )
> return s3_fs
> fs = fs_()
> print(fs.get_file_info("data"))
> {code}
> and it worked on one machine but not the other. Only setting
> {code:java}
> region="auto"
> {code}
> allowed the code to work consistently on both computers.
> Furthermore, the error message is very opaque:
> {code:java}
> Traceback (most recent call last):
> File "cluster_scripts/test_s3.py", line 51, in <module>
> print(fs.get_file_info("data"))
> File "pyarrow/_fs.pyx", line 439, in pyarrow._fs.FileSystem.get_file_info
> File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
> File "pyarrow/error.pxi", line 114, in pyarrow.lib.check_status
> OSError: When getting information for bucket 'data': AWS Error [code 100]: No response body.
> {code}
> Googling this error gives no information whatsoever. I managed to figure out the issue by switching from Cloudflare to S3, and when the issue was still going on, I explicitly set a region, but the experience was pretty painful.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)