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

Yet another float/int fix for Python 3.10+, don't assume every problem is unicode related #1303

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

hroncok
Copy link
Collaborator

@hroncok hroncok commented Jan 26, 2023

Fixes #1302

Still testing.

@hroncok hroncok changed the title Yet another float/int for fox Python 3.10+, don't assume every problem is unicode related Yet another float/int fix for Python 3.10+, don't assume every problem is unicode related Jan 26, 2023
@kliment
Copy link
Owner

kliment commented Jan 26, 2023

Should we catch other errors and report the actual error, rather than letting them drop to the caller?

@hroncok
Copy link
Collaborator Author

hroncok commented Jan 26, 2023

Should we catch other errors and report the actual error, rather than letting them drop to the caller?

I think all other errors are bugs in the code. But if you want to stay safe, we can do something like this:

except UnicodeError:
    self.log(_("Attempted to write invalid text..."))
except Exception as e:
    self.log(_("Unhandled exception: %s(%s)"), type(e), e))

@kliment
Copy link
Owner

kliment commented Jan 26, 2023

All other errors are definitely bugs in the code. This way we can actually find them. I like your proposed solution.

@hroncok
Copy link
Collaborator Author

hroncok commented Jan 26, 2023

Added the other except.

@hroncok hroncok marked this pull request as ready for review January 26, 2023 13:47
@kliment kliment merged commit 2cf3b27 into kliment:master Jan 26, 2023
@hroncok hroncok deleted the unicode_float branch January 26, 2023 14:36
neofelis2X added a commit to neofelis2X/Printrun that referenced this pull request Oct 25, 2023
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.

Pronterface GUI becomes unresponsive while printing, need to kill the app
2 participants