---------------------------------------------------------------------------
ConversionException Traceback (most recent call last)
File /nix/store/82r9yskc2azv5ls4hxcr961n3ijng40c-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/82r9yskc2azv5ls4hxcr961n3ijng40c-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/82r9yskc2azv5ls4hxcr961n3ijng40c-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:79, in Expr.__repr__(self)
77 def __repr__(self) -> str:
78 if ibis.options.interactive:
---> 79 return _capture_rich_renderable(self)
80 else:
81 return self._noninteractive_repr()
File ~/work/ibis/ibis/ibis/expr/types/core.py:59, in _capture_rich_renderable(renderable)
57 console = Console(force_terminal=False)
58 with console.capture() as capture:
---> 59 console.print(renderable)
60 return capture.get().rstrip()
File /nix/store/82r9yskc2azv5ls4hxcr961n3ijng40c-python3-3.10.14-env/lib/python3.10/site-packages/rich/console.py:1700, in Console.print(self, sep, end, style, justify, overflow, no_wrap, emoji, markup, highlight, width, height, crop, soft_wrap, new_line_start, *objects)
1698 if style is None:
1699 for renderable in renderables:
-> 1700 extend(render(renderable, render_options))
1701 else:
1702 for renderable in renderables:
File /nix/store/82r9yskc2azv5ls4hxcr961n3ijng40c-python3-3.10.14-env/lib/python3.10/site-packages/rich/console.py:1312, in Console.render(self, renderable, options)
1310 renderable = rich_cast(renderable)
1311 if hasattr(renderable, "__rich_console__") and not isclass(renderable):
-> 1312 render_iterable = renderable.__rich_console__(self, _options) # type: ignore[union-attr]
1313 elif isinstance(renderable, str):
1314 text_renderable = self.render_str(
1315 renderable, highlight=_options.highlight, markup=_options.markup
1316 )
File ~/work/ibis/ibis/ibis/expr/types/core.py:129, in Expr.__rich_console__(self, console, options)
113 except Exception as e:
114 # In IPython exceptions inside of _repr_mimebundle_ are swallowed to
115 # allow calling several display functions and choosing to display
(...)
126 #
127 # This restriction is only present in IPython, not in other REPLs.
128 console.print_exception()
--> 129 raise e
130 return console.render(rich_object, options=options)
File ~/work/ibis/ibis/ibis/expr/types/core.py:102, in Expr.__rich_console__(self, console, options)
99 if opts.interactive:
100 from ibis.expr.types.pretty import to_rich
--> 102 rich_object = to_rich(self, console_width=console_width)
103 else:
104 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:409, in Expr.execute(self, limit, params, **kwargs)
391 def execute(
392 self,
393 limit: int | str | None = "default",
394 params: Mapping[ir.Value, Any] | None = None,
395 **kwargs: Any,
396 ):
397 """Execute an expression against its backend if one exists.
398
399 Parameters
(...)
407 Keyword arguments
408 """
--> 409 return self._find_backend(use_default=True).execute(
410 self, limit=limit, params=params, **kwargs
411 )
File ~/work/ibis/ibis/ibis/backends/duckdb/__init__.py:1431, in Backend.execute(self, expr, params, limit, **_)
1428 import pandas as pd
1429 import pyarrow.types as pat
-> 1431 table = self._to_duckdb_relation(expr, params=params, limit=limit).arrow()
1433 df = pd.DataFrame(
1434 {
1435 name: (
(...)
1447 }
1448 )
1449 df = DuckDBPandasData.convert_table(df, expr.as_table().schema())
ConversionException: Conversion Error: Could not convert string 'a string' to INT64