Skip to content

Commit c4611fe

Browse files
committed
nicer error handling, not there yet
1 parent ca01346 commit c4611fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

narwhals/translate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@ def _from_native_impl( # noqa: C901, PLR0911, PLR0912, PLR0915
548548
try:
549549
df_compliant = frame(native_object, version=Version.MAIN)
550550
return df_compliant.to_narwhals()
551-
except:
551+
# @mp: not sure if correct exception, check. Improve error message
552+
except TypeError as e:
553+
print(f'Cannot read it the dataframe, reason {e}. Currently only supporting daft plugins')
552554
# try the next plugin
553555
continue
554-
555-
556-
556+
557557
"""
558558
TODO @mp: need logic to go over all the entry points found, and if daft found,
559559
(others later), we return the daft dataframe from_native. I think the transformation has

0 commit comments

Comments
 (0)