Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: pyav 14 removed AVError to be replaced by FFmpegError #461

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tacaswell
Copy link
Member

  • pyav 7 added FFmpegError and added an alias to AVError for back compatibility
  • pyav 14 removed the back-compatibility alias

This should work in all cases:

  • 7+ imports the newer exception
  • pre-7 falls back to old import after failing to import the new one.

- pyav 7 added FFmpegError and added an alias to AVError for back compatibility
- pyav 14 removed the back-compatibility alias

This should work in all cases:
 - 7+ imports the newer exception
 - pre-7 falls back to old import after failing to import the new one.
@tacaswell
Copy link
Member Author

I'm a bit stumped by this failure

pytest -k "ReaderSequence and  test_simple_negative_index" --pdb
===================================================================== test session starts =====================================================================
platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0
rootdir: /home/tcaswell/source/bnl/soft-matter/pims
configfile: pytest.ini
collected 516 items / 515 deselected / 1 selected

pims/tests/test_imseq.py F
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

self = <pims.tests.test_imseq.ReaderSequence testMethod=test_simple_negative_index>

    def test_simple_negative_index(self):
        self.check_skip()
>       self.v[-1]

pims/tests/test_common.py:361:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/tmp/pims/lib/python3.13/site-packages/slicerator/__init__.py:187: in __getitem__
    return self._get(indices)
pims/base_frames.py:100: in __getitem__
    return self.get_frame(key)
pims/base_frames.py:598: in get_frame
    result = self._get_frame_wrapped(**coords)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ReaderSequence>
Source: /home/tcaswell/source/bnl/soft-matter/pims/pims/tests/data/image_sequence3d/*.png
Axes: 4
Axis 'y' size: 10
Axis 'x' size: 11
Axis 'c' size: 3
Axis 't' size: 16
Pixel Datatype: uint8
coords = {'c': 0, 'x': 0, 'y': 0}, i = np.int64(15), reader = <FramesSequenceND>
Axes: 2
Axis 'y' size: 10
Axis 'x' size: 11
Pixel Datatype: uint8, ax = 'c'

    def _get_seq_frame(self, **coords):
        i = coords.pop(self._imseq_axis)
        with self.reader_cls(self._filepaths[i], **self.kwargs) as reader:
            # check whether the reader has the expected shape
            for ax in self.sizes:
                if ax == self._imseq_axis:
                    continue
                if ax not in reader.sizes:
>                   raise RuntimeError('{} does not have '
                                       'axis {}'.format(self._filepaths[i], ax))
E                   RuntimeError: /home/tcaswell/source/bnl/soft-matter/pims/pims/tests/data/image_sequence3d/file_t003_z002_c2.png does not have axis c

pims/image_sequence.py:256: RuntimeError

I am seeing this failure locally with all versions of Python and ever with 3.9.20 and exactly these dependencies. 4 months ago main ran and passed, but those logs have timed out and the builds got suspended because the repo was quiet). Pushing back imageio versions does not help locally.

so questions:

  • why is it only failing on some versions of Python when extras are installed?
  • why is it passing anywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant