Closed Somainer closed 3 weeks ago
When a class implemented __getattr__ or __getattribute__, marimo will treat this instance as a DataFrameLike object, trying to render a table from it and raise exceptions.
__getattr__
__getattribute__
DataFrameLike
{ "marimo": "0.6.17", "OS": "Darwin", "OS Version": "23.5.0", "Processor": "arm", "Python Version": "3.11.5", "Binaries": { "Browser": "125.0.6422.142", "Node": "v22.1.0" }, "Requirements": { "click": "8.1.7", "importlib-resources": "missing", "jedi": "0.19.1", "markdown": "3.6", "pymdown-extensions": "10.8.1", "pygments": "2.18.0", "tomlkit": "0.12.5", "uvicorn": "0.30.1", "starlette": "0.37.2", "websockets": "12.0", "typing-extensions": "4.7.1", "black": "24.4.2" } }
class Boom: def __getattr__(self, _): return ...
b = Boom()
This will result an error: TypeError: 'ellipsis' object is not callable
TypeError: 'ellipsis' object is not callable
Thanks for pointing this out - I'll fix this today
Describe the bug
When a class implemented
__getattr__
or__getattribute__
, marimo will treat this instance as aDataFrameLike
object, trying to render a table from it and raise exceptions.Environment
{ "marimo": "0.6.17", "OS": "Darwin", "OS Version": "23.5.0", "Processor": "arm", "Python Version": "3.11.5", "Binaries": { "Browser": "125.0.6422.142", "Node": "v22.1.0" }, "Requirements": { "click": "8.1.7", "importlib-resources": "missing", "jedi": "0.19.1", "markdown": "3.6", "pymdown-extensions": "10.8.1", "pygments": "2.18.0", "tomlkit": "0.12.5", "uvicorn": "0.30.1", "starlette": "0.37.2", "websockets": "12.0", "typing-extensions": "4.7.1", "black": "24.4.2" } }
Code to reproduce
This will result an error:
TypeError: 'ellipsis' object is not callable