-
Notifications
You must be signed in to change notification settings - Fork 24
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
invalid literal for int() with base 10: #127
Comments
Hi @GordonW-Printer , please attach the affected gcode-file, so it is easier for my to reproduce the issue. Thx, in advance |
This file reports the error at line #14346. |
Hi @GordonW-Printer ,
I thought it only detects the M117 with numbers at the end, but that was wrong! Now I switch to:
So, now the first char behind Will be fixed in the next release! |
Olli, Regards, |
Hi, Looking at the profiler O/P, I see that the match dropped from 0.017 seconds to 0.007 on my test system and from 0.425 seconds to 0.273 seconds on the R-Pi-Zero that runs my Octoprint instance. |
Hi @GordonW-Printer, thanks I appreciate that a lot!!! |
Hi, I used to following command "python3 -m cProfile test.py". |
Hi @GordonW-Printer , as mentioned the new Version 1.19.0 now includes the changed pattern, but not totally changed as you suggested. Maybe you can test the new version and give me feedback. Thx, in advance |
Updated to 1.19.1 (latest version) and the error message is no longer being reported. |
I'm using Octoprint 1.4, DisplayLayerProgress 1.8.1, Python 2.7, PrusaSlicer 2.2.0-alpha2 and my Octoprint Upload folder is actually an SMB (cifs) share from a NAS, so I don't go through the Octoprint "Upload" process, I simply write directly to the NAS from the system hosting the slicer S/W.
Because I never go through you Upload Gcode processor, I have added Custom Gcodes to the slicer to insert the M117 layer codes:
Before Layer Change G-code:
;Original - BEFORE_LAYER_CHANGE
G92 E0.0
;[layer_z]
; Following Setting used by Octoprint DisplayLayerProgress Plugin.
M117 INDICATOR-Layer{layer_num+1}
End G-code:
; Following Setting used by Octoprint DisplayLayerProgress Plugin.
;MAXZ:[layer_z]
All seems to be working, with the exception of the following error message:
octoprint.plugins.DisplayLayerProgress - ERROR - ERROR! File: '/mnt/HomeNAS/3D_Projects/OctoPrint/GWtest1.gcode' Line: 13572 Message: 'invalid literal for int() with base 10: '''
Looking at the Gcode file, line #13575 is a comment inserted at the end of the file by the slicer, I don't find any way to suppress the addition of the comments by the slicer.
13572 ; before_layer_gcode = ;Original - BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\n; Following Setting used by Octoprint DisplayLayerProgress Plugin.\nM117 INDICATOR -Layer{layer_num+1}
While I'm a python novice (experience in several other coding languages), looking at the code I suspect that the DisplayLayerProgress code "LAYER_COUNT_EXPRESSION" is matching the M117 part of the comment and reporting it as an error.
So my question is can you suggest a way to restrict the detection of "M117" to the leading byte of the lines?
The text was updated successfully, but these errors were encountered: