Skip to content

Commit

Permalink
Fix sql alchemy plugin error `module 'pandas.io' has no attribute 'co…
Browse files Browse the repository at this point in the history
…mmon' ` (#2249)

Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
  • Loading branch information
Future-Outlier authored and fiedlerNr9 committed Jul 25, 2024
1 parent a731863 commit ed0fa55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion flytekit/types/structured/basic_dfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
def get_pandas_storage_options(
uri: str, data_config: DataConfig, anonymous: bool = False
) -> typing.Optional[typing.Dict]:
if pd.io.common.is_fsspec_url(uri):
from pandas.io.common import is_fsspec_url

if is_fsspec_url(uri):
return get_fsspec_storage_options(protocol=get_protocol(uri), data_config=data_config, anonymous=anonymous)

# Pandas does not allow storage_options for non-fsspec paths e.g. local.
Expand Down
2 changes: 1 addition & 1 deletion plugins/flytekit-sqlalchemy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

microlib_name = f"flytekitplugins-{PLUGIN_NAME}"

plugin_requires = ["flytekit>=1.3.0b2,<2.0.0", "sqlalchemy>=1.4.7", "pandas"]
plugin_requires = ["flytekit>=1.3.0b2,<2.0.0", "sqlalchemy>=1.4.7", "pandas<=2.1.4"]

__version__ = "0.0.0+develop"

Expand Down

0 comments on commit ed0fa55

Please sign in to comment.