data-to-insight / data-to-insight/patch
AttributeError: module 'pyarrow' has no attribute 'ChunkedArray' on Patch Demo
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Happened to notice this.
https://patch.datatoinsight.org/app?file=https://raw.githubusercontent.com/data-to-insight/patch/main/apps/009_PATCh_demo/app.py&req=plotly
:Logging for ref, as no time to look further atm.
Might be a lib ver incompatibility issue - pyodide? Pyarrow.
Error:
AttributeError: module 'pyarrow' has no attribute 'ChunkedArray'
Traceback:
File "/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 557, in _run_script
exec(code, module.dict)
File "/home/pyodide/app.py", line 61, in
fig = px.line(df, x="time_period", y="number", title=f"{chart_title}")
File "/lib/python3.10/site-packages/plotly/express/_chart_types.py", line 270, in line
return make_figure(args=locals(), constructor=go.Scatter)
File "/lib/python3.10/site-packages/plotly/express/_core.py", line 2755, in make_figure
fig.add_traces(frame_list[0]["data"] if len(frame_list) > 0 else [])
File "/lib/python3.10/site-packages/plotly/graph_objs/_figure.py", line 992, in add_traces
return super(Figure, self).add_traces(
File "/lib/python3.10/site-packages/plotly/basedatatypes.py", line 2191, in add_traces
data = self._data_validator.validate_coerce(data)
File "/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 2713, in validate_coerce
trace = self.get_trace_class(trace_type)(
File "/lib/python3.10/site-packages/plotly/graph_objs/_scatter.py", line 3634, in init
self["x"] = _v
File "/lib/python3.10/site-packages/plotly/basedatatypes.py", line 4860, in setitem
self._set_prop(prop, value)
File "/lib/python3.10/site-packages/plotly/basedatatypes.py", line 5199, in _set_prop
val = validator.validate_coerce(val)
File "/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 410, in validate_coerce
v = copy_to_readonly_numpy_array(v)
File "/lib/python3.10/site-packages/_plotly_utils/basevalidators.py", line 97, in copy_to_readonly_numpy_array
v = nw.from_native(v, allow_series=True, pass_through=True)
File "/lib/python3.10/site-packages/narwhals/stable/v1/init.py", line 1620, in from_native
result = _from_native_impl(
File "/lib/python3.10/site-packages/narwhals/translate.py", line 626, in _from_native_impl
elif is_pyarrow_chunked_array(native_object):
File "/lib/python3.10/site-packages/narwhals/dependencies.py", line 218, in is_pyarrow_chunked_array
return (pa := get_pyarrow()) is not None and isinstance(ser, pa.ChunkedArray)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/009_PATCh_demo/app.py at the plotting call around line 61, and reproduce the failure through the linked Patch Demo URL. Check the pyarrow, Plotly, and Pyodide environment involved in the traceback; done means the demo renders its line chart without the ChunkedArray AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- plotly, python, streamlit
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100