From b533d6637b4249d7ada09ef9879cd0066ea487e9 Mon Sep 17 00:00:00 2001 From: laughingman7743 Date: Sun, 29 Dec 2024 17:07:20 +0900 Subject: [PATCH] Fix AttributeError: 'NoneType' object has no attribute 'get_default_converter' --- pyathena/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyathena/connection.py b/pyathena/connection.py index 8568c9ff..5d4cd0d2 100644 --- a/pyathena/connection.py +++ b/pyathena/connection.py @@ -234,7 +234,7 @@ def __init__( self._converter = converter self._formatter = formatter if formatter else DefaultParameterFormatter() self._retry_config = retry_config if retry_config else RetryConfig() - self.cursor_class = cast(Type[ConnectionCursor], cursor_class) + self.cursor_class = cursor_class if cursor_class else cast(Type[ConnectionCursor], Cursor) self.cursor_kwargs = cursor_kwargs if cursor_kwargs else {} self.kill_on_interrupt = kill_on_interrupt self.result_reuse_enable = result_reuse_enable