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

UnicodeDecodeError in on_tracker_reply_alert #7598

Closed
kozlovsky opened this issue Sep 18, 2023 · 2 comments
Closed

UnicodeDecodeError in on_tracker_reply_alert #7598

kozlovsky opened this issue Sep 18, 2023 · 2 comments
Assignees

Comments

@kozlovsky
Copy link
Contributor

Here:

    def on_tracker_reply_alert(self, alert: lt.tracker_reply_alert):
        self._logger.info(f'On tracker reply alert: {alert}')
        ...

Related to #7406.

In my opinion, the correct way to fix this class of errors is to add a safe_repr function and use it for getting alert repr:

    def on_tracker_reply_alert(self, alert: lt.tracker_reply_alert):
        self._logger.info(f'On tracker reply alert: {safe_repr(alert)}')
        ...
@kozlovsky kozlovsky added this to the 7.14.0 milestone Sep 18, 2023
@sentry-for-tribler
Copy link

Sentry issue: TRIBLER-1BW

@kozlovsky kozlovsky self-assigned this Sep 29, 2023
kozlovsky added a commit that referenced this issue Oct 2, 2023
…icode_decode_error

Fixes #7598: Use safe_repr function to display alert reprs; catch UnicodeDecodeError in all alert handlers
@kozlovsky
Copy link
Contributor Author

Fixed in #7616

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

No branches or pull requests

1 participant