---------------------------------------------------------------------------
ConversionException Traceback (most recent call last)
File /nix/store/yrwkq165zkr5dxs0pd2135ac41pqrv02-python3-3.10.14-env/lib/python3.10/site-packages/IPython/core/formatters.py:711, in PlainTextFormatter.__call__(self, obj)
704 stream = StringIO()
705 printer = pretty.RepresentationPrinter(stream, self.verbose,
706 self.max_width, self.newline,
707 max_seq_length=self.max_seq_length,
708 singleton_pprinters=self.singleton_printers,
709 type_pprinters=self.type_printers,
710 deferred_pprinters=self.deferred_printers)
--> 711 printer.pretty(obj)
712 printer.flush()
713 return stream.getvalue()
File /nix/store/yrwkq165zkr5dxs0pd2135ac41pqrv02-python3-3.10.14-env/lib/python3.10/site-packages/IPython/lib/pretty.py:419, in RepresentationPrinter.pretty(self, obj)
408 return meth(obj, self, cycle)
409 if (
410 cls is not object
411 # check if cls defines __repr__
(...)
417 and callable(_safe_getattr(cls, "__repr__", None))
418 ):
--> 419 return _repr_pprint(obj, self, cycle)
421 return _default_pprint(obj, self, cycle)
422 finally:
File /nix/store/yrwkq165zkr5dxs0pd2135ac41pqrv02-python3-3.10.14-env/lib/python3.10/site-packages/IPython/lib/pretty.py:787, in _repr_pprint(obj, p, cycle)
785 """A pprint that just redirects to the normal repr function."""
786 # Find newlines and replace them with p.break_()
--> 787 output = repr(obj)
788 lines = output.splitlines()
789 with p.group():
File ~/work/ibis/ibis/ibis/expr/types/core.py:83, in Expr.__repr__(self)
81 def __repr__(self) -> str:
82 if ibis.options.interactive:
---> 83 return _capture_rich_renderable(self)
84 else:
85 return self._noninteractive_repr()
File ~/work/ibis/ibis/ibis/expr/types/core.py:63, in _capture_rich_renderable(renderable)
61 console = Console(force_terminal=False)
62 with console.capture() as capture:
---> 63 console.print(renderable)
64 return capture.get().rstrip()
File /nix/store/yrwkq165zkr5dxs0pd2135ac41pqrv02-python3-3.10.14-env/lib/python3.10/site-packages/rich/console.py:1710, in Console.print(self, sep, end, style, justify, overflow, no_wrap, emoji, markup, highlight, width, height, crop, soft_wrap, new_line_start, *objects)
1708 if style is None:
1709 for renderable in renderables:
-> 1710 extend(render(renderable, render_options))
1711 else:
1712 for renderable in renderables:
File /nix/store/yrwkq165zkr5dxs0pd2135ac41pqrv02-python3-3.10.14-env/lib/python3.10/site-packages/rich/console.py:1311, in Console.render(self, renderable, options)
1309 renderable = rich_cast(renderable)
1310 if hasattr(renderable, "__rich_console__") and not isclass(renderable):
-> 1311 render_iterable = renderable.__rich_console__(self, _options) # type: ignore[union-attr]
1312 elif isinstance(renderable, str):
1313 text_renderable = self.render_str(
1314 renderable, highlight=_options.highlight, markup=_options.markup
1315 )
File ~/work/ibis/ibis/ibis/expr/types/core.py:106, in Expr.__rich_console__(self, console, options)
103 if opts.interactive:
104 from ibis.expr.types.pretty import to_rich
--> 106 rich_object = to_rich(self, console_width=console_width)
107 else:
108 rich_object = Text(self._noninteractive_repr())
File ~/work/ibis/ibis/ibis/expr/types/pretty.py:270, in to_rich(expr, max_rows, max_columns, max_length, max_string, max_depth, console_width)
267 from ibis.expr.types import Scalar
269 if isinstance(expr, Scalar):
--> 270 return _to_rich_scalar(
271 expr, max_length=max_length, max_string=max_string, max_depth=max_depth
272 )
273 else:
274 return _to_rich_table(
275 expr,
276 max_rows=max_rows,
(...)
281 console_width=console_width,
282 )
File ~/work/ibis/ibis/ibis/expr/types/pretty.py:294, in _to_rich_scalar(expr, max_length, max_string, max_depth)
285 def _to_rich_scalar(
286 expr: Scalar,
287 *,
(...)
290 max_depth: int | None = None,
291 ) -> Pretty:
292 value = format_values(
293 expr.type(),
--> 294 [expr.execute()],
295 max_length=max_length or ibis.options.repr.interactive.max_length,
296 max_string=max_string or ibis.options.repr.interactive.max_string,
297 max_depth=max_depth or ibis.options.repr.interactive.max_depth,
298 )[0]
299 return Panel(value, expand=False, box=box.SQUARE)
File ~/work/ibis/ibis/ibis/expr/types/core.py:396, in Expr.execute(self, limit, params, **kwargs)
378 def execute(
379 self,
380 limit: int | str | None = "default",
381 params: Mapping[ir.Value, Any] | None = None,
382 **kwargs: Any,
383 ):
384 """Execute an expression against its backend if one exists.
385
386 Parameters
(...)
394 Keyword arguments
395 """
--> 396 return self._find_backend(use_default=True).execute(
397 self, limit=limit, params=params, **kwargs
398 )
File ~/work/ibis/ibis/ibis/backends/duckdb/__init__.py:1446, in Backend.execute(self, expr, params, limit, **_)
1443 import pandas as pd
1444 import pyarrow.types as pat
-> 1446 table = self._to_duckdb_relation(expr, params=params, limit=limit).arrow()
1448 df = pd.DataFrame(
1449 {
1450 name: (
(...)
1462 }
1463 )
1464 df = DuckDBPandasData.convert_table(df, expr.as_table().schema())
ConversionException: Conversion Error: Could not convert string 'a string' to INT64
LINE 1: SELECT CAST('a string' AS BIGINT) AS "Cast('a ...
^