属性错误:模块"pyspark.sql.utils"没有属性"convert_exception"

flvlnr44  于 2022-12-26  发布在  Spark
关注(0)|答案(1)|浏览(140)

嗨,我有一个问题与deltalake我试图导入from delta import *,但我得到了以下错误任何人都有任何想法如何解决它,请分享它提前感谢

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/delta/__init__.py", line 17, in <module>
    from delta.tables import DeltaTable
  File "/usr/local/lib/python3.7/dist-packages/delta/tables.py", line 17, in <module>
    import delta.exceptions  # noqa: F401; pylint: disable=unused-variable
  File "/usr/local/lib/python3.7/dist-packages/delta/exceptions.py", line 152, in <module>
    _patch_convert_exception()
  File "/usr/local/lib/python3.7/dist-packages/delta/exceptions.py", line 140, in _patch_convert_exception
    convert_sql_exception = utils.convert_exception
AttributeError: module 'pyspark.sql.utils' has no attribute 'convert_exception'
>>> from delta import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/delta/__init__.py", line 17, in <module>
    from delta.tables import DeltaTable
  File "/usr/local/lib/python3.7/dist-packages/delta/tables.py", line 17, in <module>
    import delta.exceptions  # noqa: F401; pylint: disable=unused-variable
  File "/usr/local/lib/python3.7/dist-packages/delta/exceptions.py", line 152, in <module>
    _patch_convert_exception()
  File "/usr/local/lib/python3.7/dist-packages/delta/exceptions.py", line 140, in _patch_convert_exception
    convert_sql_exception = utils.convert_exception
AttributeError: module 'pyspark.sql.utils' has no attribute 'convert_exception'
xxhby3vn

xxhby3vn1#

我有同样的问题,我使用的delta版本0. 6. 0和工作!!!

相关问题