What I’m trying to do:
I am using the Tabulator in parts of my code and it has been working just great until four hours ago. I now get this reply when trying to use it:
ExternalError: TypeError: cell.tp$getattr is not a function
at Scenario.ScenarioTable, line 227called from app/tabulator/Tabulator/_custom_modules.py:called from app/tabulator/Tabulator/_custom_modules.py:called from app/tabulator/Tabulator/_helpers.py:153
ExternalError: TypeError: row.tp$getattr is not a function
at Scenario.ScenarioTable, line 775
What I’ve tried and what’s not working:
I have restarted and gone back to older versions but get the same error.
Has something changed recently with the (Anvil) Tabulator?
Code Sample:
In this case it the line values = cell.getRow().getData() # full row dict that create the error but the error pops up everywhere I do a get of some sort.
def sparkline_formatter(cell):
"""Render a tiny sparkline using SVG inside a Tabulator cell."""
values = cell.getRow().getData() # full row dict
time_series = []
# Gather values from your time fields (assumes time_stamps is ordered)
for t in self.time_stamps:
val = values.get(t)
if isinstance(val, (int, float)):
time_series.append(val)
if len(time_series) < 2:
return "<div></div>"
# Normalize data to [0, 1]
min_v = min(time_series)
max_v = max(time_series)
scale = max_v - min_v if max_v != min_v else 1.0
norm = [(v - min_v) / scale for v in time_series]
# Create SVG polyline
w = 100
h = 25
points = " ".join(f"{i * w / len(norm):.2f},{(1 - v) * h:.2f}" for i, v in enumerate(norm))
svg = f"""
<svg width="{w}" height="{h}" xmlns="http://www.w3.org/2000/svg">
<polyline fill="none" stroke="steelblue" stroke-width="1.5" points="{points}" />
</svg>
"""
return svg
Clone link:
share a copy of your app
All help is very much appreciated!