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

why exclude_regex_paths dont work with ignore_order #453

Open
alisherdev98 opened this issue Mar 1, 2024 · 1 comment
Open

why exclude_regex_paths dont work with ignore_order #453

alisherdev98 opened this issue Mar 1, 2024 · 1 comment

Comments

@alisherdev98
Copy link

alisherdev98 commented Mar 1, 2024

class Image(BaseModel):
    size: SizeFormat
    extension: ImageFormat
    data: bytes

Image object contains the data field, which is a byte string representing the image. When comparing Image lists, an error occurs:

{UnicodeDecodeError}UnicodeDecodeError('utf-8', b'RIFF\x84-\x03\x00WEBPVP8 x-\x03\x00P\xe1\n\x9d\x01*\x80\x078\x04>m2\x95H\xa4"\xa4\xa6$\x93\xca\x...x03\x00P\n\x01*\x078...'. Please either pass ignore_encoding_errors=True or pass the encoding via encodings=['utf-8', '...'].")

I'm trying to calculate the differences in the following way:
DeepDiff([image1], [image2], ignore_order=True, exclude_regex_paths=r'\[\d+\].data')
But the error does not disappear...

@seperman
Copy link
Owner

seperman commented Apr 5, 2024

@alisherdev98 Thanks for reporting the bug. Can you give me reproducible code please?

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

No branches or pull requests

2 participants