geo-activity-playground
geo-activity-playground copied to clipboard
Version issues with Vega Fusion and Protobuf
A user has reported issues with Protobuf and Vega Fusion:
2024-02-05 12:42:36 geo_activity_playground.webui.app ERROR Exception on / [GET]
Traceback (most recent call last):
File "/home/$USER/.local/lib/python3.10/site-packages/altair/utils/_importers.py", line 15, in import_vegafusion
import vegafusion as vf # type: ignore
File "/home/$USER/.local/lib/python3.10/site-packages/vegafusion/__init__.py", line 1, in <module>
from .runtime import runtime
File "/home/$USER/.local/lib/python3.10/site-packages/vegafusion/runtime.py", line 6, in <module>
from .dataset import SqlDataset, DataFrameDataset
File "/home/$USER/.local/lib/python3.10/site-packages/vegafusion/dataset/__init__.py", line 2, in <module>
from .dataframe import DataFrameDataset, DataFrameOperationNotSupportedError
File "/home/$USER/.local/lib/python3.10/site-packages/vegafusion/dataset/dataframe.py", line 3, in <module>
from vegafusion.proto.datafusion_pb2 import LogicalExprNode
File "/home/$USER/.local/lib/python3.10/site-packages/vegafusion/proto/datafusion_pb2.py", line 8, in <module>
from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/lib/python3/dist-packages/google/protobuf/internal/__init__.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/$USER/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/$USER/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/$USER/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/$USER/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/$USER/.local/lib/python3.10/site-packages/geo_activity_playground/webui/app.py", line 209, in index
return render_template("index.html.j2", **entry_controller.render())
File "/home/$USER/.local/lib/python3.10/site-packages/geo_activity_playground/webui/entry_controller.py", line 19, in render
"distance_last_30_days_plot": distance_last_30_days_meta_plot(
File "/home/$USER/.local/lib/python3.10/site-packages/geo_activity_playground/webui/entry_controller.py", line 41, in distance_last_30_days_meta_plot
alt.Chart(
File "/home/$USER/.local/lib/python3.10/site-packages/altair/vegalite/v5/api.py", line 1042, in to_json
spec = self.to_dict(
File "/home/$USER/.local/lib/python3.10/site-packages/altair/vegalite/v5/api.py", line 2975, in to_dict
return super().to_dict(
File "/home/$USER/.local/lib/python3.10/site-packages/altair/vegalite/v5/api.py", line 993, in to_dict
return _compile_with_vegafusion(vegalite_spec)
File "/home/$USER/.local/lib/python3.10/site-packages/altair/utils/_vegafusion_data.py", line 149, in compile_with_vegafusion
vf = import_vegafusion()
File "/home/$USER/.local/lib/python3.10/site-packages/altair/utils/_importers.py", line 19, in import_vegafusion
raise ImportError(
ImportError: The "vegafusion" data transformer and chart.transformed_data feature requires
version 1.4.0 or greater of the 'vegafusion-python-embed' and 'vegafusion' packages.
These can be installed with pip using:
pip install "vegafusion[embed]>=1.4.0"
Or with conda using:
conda install -c conda-forge "vegafusion-python-embed>=1.4.0" "vegafusion>=1.4.0"
He said that he has tried the pip install
but that hasn't changed anything.