Closed Jabele10 closed 10 months ago
I increased the read size to 1 MiB, however this only alleviates the issue. Truthfully metadata.py
isn't intended to inspect a large portion of the gcode file, and it would be preferable to avoid inspecting gcode commands all together. A more robust solution that I may look into is to create a generic metadata specification that can be added to the start or end gcode of a slicer. Most slicers seem to support placeholders, so it would be possible to put it all in one place.
What happened
I am using PrusaSlicer (by viewing the code this might happen to other slicers as well) to slice my G-Code and had the issue that the object height sometimes had no value assigned in the Files view. I traced logs and searched the metadata.py for some indication of the problem. The problems seems to be a bad combination of circumstances:
parse_object_height
function not finding any matches since both patterns searched for were located above the footer.I guess this is quite an edge case but it would be really nice to get the object height get parsed correctly even for such files.
Client
Mainsail
Browser
Chrome
How to reproduce
Additional information
Client and Browser are just the ones I used. However this issue does not depend on the Browser or client since the problem is in the Moonraker Python code itself.