google / mediapy

This Python library makes it easy to display images and videos in a notebook.
https://pypi.org/project/mediapy/
Apache License 2.0
389 stars 18 forks source link

Release 1.2.1 breaks Python 3.8 #47

Closed brentyi closed 4 months ago

brentyi commented 4 months ago

Hello!

It looks like this line: https://github.com/google/mediapy/blob/c51276bba1d2c19305618786095fd421400ed210/mediapy/__init__.py#L191

breaks Python 3.8, because os.PathLike[str] isn't subscriptable.

Here's the full error:

>>> import mediapy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/brentyi/miniconda3/envs/py38/lib/python3.8/site-packages/mediapy/__init__.py", line 191, in <module>
    _Path = typing.Union[str, os.PathLike[str]]
TypeError: 'ABCMeta' object is not subscriptable

cc https://github.com/nerfstudio-project/nerfstudio/issues/3189