You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/08 10:01:12 UTC

[GitHub] [iceberg] Fokko opened a new issue, #5728: Catch internal exceptions

Fokko opened a new issue, #5728:
URL: https://github.com/apache/iceberg/issues/5728

   ### Feature Request / Improvement
   
   For PyIceberg, we want to catch the exceptions thrown by s3fs/pyarrow/etc and turn them into a pyiceberg exception:
   
   ```
   >>> catalog.load_table(('nyc', 'taxis'))
   Traceback (most recent call last):
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 110, in _error_wrapper
       return await func(*args, **kwargs)
     File "/opt/homebrew/lib/python3.10/site-packages/aiobotocore/client.py", line 265, in _make_api_call
       raise error_class(parsed_response, operation_name)
   botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/Users/fokkodriesprong/Desktop/iceberg/python/pyiceberg/catalog/hive.py", line 356, in load_table
       return self._convert_hive_into_iceberg(hive_table, io)
     File "/Users/fokkodriesprong/Desktop/iceberg/python/pyiceberg/catalog/hive.py", line 257, in _convert_hive_into_iceberg
       metadata = FromInputFile.table_metadata(file)
     File "/Users/fokkodriesprong/Desktop/iceberg/python/pyiceberg/serializers.py", line 56, in table_metadata
       with input_file.open() as input_stream:
     File "/Users/fokkodriesprong/Desktop/iceberg/python/pyiceberg/io/fsspec.py", line 80, in open
       return self._fs.open(self.location, "rb")
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/spec.py", line 1037, in open
       f = self._open(
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 605, in _open
       return S3File(
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 1911, in __init__
       super().__init__(
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/spec.py", line 1385, in __init__
       self.size = self.details["size"]
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/spec.py", line 1398, in details
       self._details = self.fs.info(self.path)
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/asyn.py", line 86, in wrapper
       return sync(self.loop, func, *args, **kwargs)
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/asyn.py", line 66, in sync
       raise return_result
     File "/opt/homebrew/lib/python3.10/site-packages/fsspec/asyn.py", line 26, in _runner
       result[0] = await coro
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 1140, in _info
       out = await self._call_s3(
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 332, in _call_s3
       return await _error_wrapper(
     File "/opt/homebrew/lib/python3.10/site-packages/s3fs/core.py", line 137, in _error_wrapper
       raise err
   PermissionError: Forbidden
   ```
   
   This makes it easier for the end-user to handle the exceptions, and doesn't have to care about the implementation details
   
   ### Query engine
   
   Other


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] github-actions[bot] closed issue #5728: Catch internal exceptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5728: Catch internal exceptions
URL: https://github.com/apache/iceberg/issues/5728


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] robertsont commented on issue #5728: Catch internal exceptions

Posted by GitBox <gi...@apache.org>.
robertsont commented on issue #5728:
URL: https://github.com/apache/iceberg/issues/5728#issuecomment-1279840647

   Hi all, I'd be interested in taking this work on, seems like a good first issue for getting familiar with the iceberg project. If that's fine with you all, I can start by attempting to create a map from underlying library errors to pyiceberg.exceptions classes?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] github-actions[bot] commented on issue #5728: Catch internal exceptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5728:
URL: https://github.com/apache/iceberg/issues/5728#issuecomment-1526799602

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] github-actions[bot] commented on issue #5728: Catch internal exceptions

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5728:
URL: https://github.com/apache/iceberg/issues/5728#issuecomment-1507754925

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org