我在 python 脚本(plotly dash 应用程序)中使用 python Snowflake 连接器,今天,在我不更改代码的情况下,该应用程序停止工作。我尝试了一些方法来找出可能出现的问题,我什至尝试运行示例代码雪花文档 https://docs.snowflake.net/manuals/user-guide/python-connector-example.html我得到了同样的错误:
code:
cur = conn.cursor()
try:
cur.execute("SELECT col1, col2 FROM test_table ORDER BY col1")
for (col1, col2) in cur:
print('{0}, {1}'.format(col1, col2))
finally:
cur.close()
error:
Traceback (most recent call last):
File "db_connection.py", line 48, in <module>
cur.execute("SELECT col1, col2 FROM test_table ORDER BY col1")
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snowflake/connector/cursor.py", line 580, in execute
self._init_result_and_meta(data, _use_ijson)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/snowflake/connector/cursor.py", line 630, in _init_result_and_meta
self._result = ArrowResult(data, self, use_dict_result=self._use_dict_result)
File "arrow_result.pyx", line 42, in snowflake.connector.arrow_result.ArrowResult.__init__
File "arrow_result.pyx", line 156, in snowflake.connector.arrow_result.ArrowResult._reset
NameError: name 'EmptyPyArrowIterator' is not defined
连接已建立,我能够在数据库中创建表,但我似乎无法查询和迭代数据。
I am on macOS Catalina 10.15.1
, snowflake-connector-python==2.1.0
, Python 3.7.0
.