waymo-open-dataset
waymo-open-dataset copied to clipboard
TypeError: 'type' object is not subscriptable
from waymo_open_dataset import v2 Traceback (most recent call last): File "
", line 1, in File "/path/python/envs/waymo/lib/python3.8/site-packages/waymo_open_dataset/v2/init.py", line 19, in from waymo_open_dataset.v2 import column_types as _column_types File "/path/python/envs/waymo/lib/python3.8/site-packages/waymo_open_dataset/v2/column_types.py", line 27, in from waymo_open_dataset.v2 import component File "/path/python/envs/waymo/lib/python3.8/site-packages/waymo_open_dataset/v2/component.py", line 32, in class Component(metaclass=abc.ABCMeta): File "/path/python/envs/waymo/lib/python3.8/site-packages/waymo_open_dataset/v2/component.py", line 65, in Component def from_dict(cls: Type[_T], columns: dict[str, Any]) -> _T: TypeError: 'type' object is not subscriptable
I have encountered a similar issue. Please make sure your Python version is higher than Python 3.9 since the type annotation dict[str, Any]
is only valid for those versions. (See here for your reference)