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

Strange failure querying hotends while in progress #9

Open
astrobokonon opened this issue Jun 15, 2023 · 1 comment
Open

Strange failure querying hotends while in progress #9

astrobokonon opened this issue Jun 15, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@astrobokonon
Copy link
Member

Not sure if this is just a "busy" sort of signal from the ultimaker API or something, but I am seeing more failures along these lines:

2023-06-13 18:31:02,406 INFO     Current Progress:
2023-06-13 18:31:02,406 INFO     67.66444792096257
2023-06-13 18:31:02,407 INFO     Sleeping for 30 seconds...
2023-06-13 18:31:32,954 ERROR    Traceback (most recent call last):
2023-06-13 18:31:32,954 ERROR      File "Printzini.py", line 93, in <module>
2023-06-13 18:31:32,967 ERROR    main(conffile)
2023-06-13 18:31:32,967 ERROR      File "Printzini.py", line 86, in main
2023-06-13 18:31:32,968 ERROR    squashUltiCam=squashUltiCam)
2023-06-13 18:31:32,968 ERROR      File "/home/lig/Ultimonitor/ultimonitor/monitoring.py", line 207, in monitorUltimaker
2023-06-13 18:31:32,971 ERROR    stats = printer.statusCheck(printerip)
2023-06-13 18:31:32,972 ERROR      File "/home/lig/Ultimonitor/ultimonitor/printer.py", line 234, in statusCheck
2023-06-13 18:31:32,974 ERROR    ext1temps = headinfo['extruders'][0]['hotend']['temperature']
2023-06-13 18:31:32,976 ERROR    KeyError
2023-06-13 18:31:32,977 ERROR    :
2023-06-13 18:31:32,977 ERROR    'extruders'
2023-06-13 18:31:56,861 INFO     flowState: printing
2023-06-13 18:31:56,863 INFO     /printer/state: printing
2023-06-13 18:31:56,864 INFO     /print_job/state: printing
2023-06-13 18:31:56,899 INFO     New job found!

Looking at the lines in question

bedtemp = api.queryChecker(printerip, "printer/bed/temperature")
if bedtemp != {}:
ext1temps = headinfo['extruders'][0]['hotend']['temperature']
ext2temps = headinfo['extruders'][1]['hotend']['temperature']
else:
ext1temps = ""

I can just wrap them in a try...except block and see what comes out after that. Has happened once a day for the last 2-3 days now.

@astrobokonon astrobokonon added the bug Something isn't working label Jun 15, 2023
@astrobokonon astrobokonon self-assigned this Jun 15, 2023
astrobokonon added a commit that referenced this issue Jun 15, 2023
@astrobokonon
Copy link
Member Author

A better fix it to adjust the api helper file to account for this sort of thing, but I'm curious if more stuff downstream will fail so I'm going to try this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant