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 python error when printing a file that doesn't use the heated bed #21

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

Conversation

TheThief
Copy link

...on a printer that does have a heated bed.

The error happens because plugins.smartpreheat.bed ends up being None, which can't be multiplied by a float. I'm not sure if this is new with Python 3.

I decided to skip the smart preheat bed commands altogether if no bed temperature is found in the file (rather than just adding or 0 to the preheat commands), as this is what the printed file would have done without smart preheat.

...on a printer that does have a heated bed.

The error happens because `plugins.smartpreheat.bed` ends up being `None`, which can't be multiplied by a float. I'm not sure if this is new with Python 3.

I decided to skip the smart preheat bed commands altogether if no bed temperature is found in the file (rather than just adding `or 0` to the preheat commands), as this is what the printed file would have done without smart preheat.
@TheThief
Copy link
Author

Should fix #19

@TheThief TheThief marked this pull request as ready for review October 17, 2024 18:45
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