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

BUG: Throws error "Can't set the temperature because the printer is not ready." #62

Open
puterboy opened this issue Jan 29, 2024 · 1 comment

Comments

@puterboy
Copy link

Octoprint.log shows the following error:

2024-01-28 16:12:27,184 - octoprint.plugin - ERROR - Error while calling plugin preheat
Traceback (most recent call last):
  File "/home/kosowsky/octoprint/venv/lib/python3.11/site-packages/octoprint/plugin/__init__.py", line 275, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kosowsky/octoprint/venv/lib/python3.11/site-packages/octoprint/util/__init__.py", line 1686, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/home/kosowsky/octoprint/venv/lib/python3.11/site-packages/octoprint_preheat/__init__.py", line 367, in on_event
    self.preheat(file_name=payload["path"])
  File "/home/kosowsky/octoprint/venv/lib/python3.11/site-packages/octoprint_preheat/__init__.py", line 318, in preheat
    self.check_state()
  File "/home/kosowsky/octoprint/venv/lib/python3.11/site-packages/octoprint_preheat/__init__.py", line 231, in check_state
    raise PreheatError("Can't set the temperature because the printer is not ready.")
octoprint_preheat.PreheatError: Can't set the temperature because the printer is not ready.

While the error is seemingly harmless, it would be nice to catch this excpetion in the code rather than throwing an ugly python error in the log

@puterboy
Copy link
Author

puterboy commented Jun 4, 2024

Any progress on this????

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

1 participant