Skip to content

Misuse of collections.defaultdict during error handling. #4

@mayfield

Description

@mayfield

Simple access convention error when handling cursor errors..

Traceback (most recent call last)
2.  File "/usr/lib/python3.5/site-packages/snowflake_connector_python-1.3.14-py3.5.egg/snowflake/connector/cursor.py", line 856, in _row_to_python
      row[idx] = conv_method(col, conv_ctx)
1.  File "/usr/lib/python3.5/site-packages/snowflake_connector_python-1.3.14-py3.5.egg/snowflake/connector/converter.py", line 295, in _TIMESTAMP_NTZ_to_python
      t = ZERO_EPOCH + timedelta(seconds=(microseconds / float(1000000)))
OverflowError: date value out of range

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last)
  8.  File "/home/mayfield/project/shellish/shellish/session.py", line 119, in execute
        raise e
  7.  File "/home/mayfield/project/shellish/shellish/session.py", line 116, in execute
        result = command.run_wrap(args)
  6.  File "/home/mayfield/project/shellish/shellish/command/command.py", line 169, in run_wrap
        raise e
  5.  File "/home/mayfield/project/shellish/shellish/command/command.py", line 165, in run_wrap
        result = self.run(args)
  4.  File "/home/mayfield/project/shellish/shellish/command/autocommand.py", line 52, in run
        return self.func(*positionals, **keywords)
  3.  File "bench.py", line 54, in main
        while q.fetchone() is not None:
  2.  File "/usr/lib/python3.5/site-packages/snowflake_connector_python-1.3.14-py3.5.egg/snowflake/connector/cursor.py", line 689, in fetchone
        return self._row_to_python(row) if row is not None else None
  1.  File "/usr/lib/python3.5/site-packages/snowflake_connector_python-1.3.14-py3.5.egg/snowflake/connector/cursor.py", line 863, in _row_to_python
        type=FIELD_ID_TO_NAME(col_desc[1]),
  TypeError: 'collections.defaultdict' object is not callable

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions