___REPLACE_THIS__FEATURE_REQUEST_DESCRIPTION_GOES_HERE
Octolapse Version: ___0.4.0
OctoPrint Version: ___1.4.0
Diagnostic Logging was Enabled: ___yes
___I guess it should capture the time lapse images
___I get an error in the top right corner
Octolapse Timelapse Stopped
File line number 14 was expected, but 9 was received!
OS Name: ___OctoPi
Os Version: ___0.18.0
Printer Model: ___Ender 3 Pro
Printer Firmware Version: ___Ender-3 Pro1.1.6BLTouchV3.1 PowerLossContinueEnglish 4.23
Browser: ___Microsoft Edge
Browser OS: ___Windows 10, build 18362_19h1
Link to Gcode File: ___don't know how to do this
Link to settings.json with all passwords removed: ___REPLACE_THIS__SETTINGS_JSON_LINK_GOES_HERE
Link to plugin_octolapse.log: LINK_GOES_HERE
Link to octoprint.log: ___REPLACE_THIS__LINK_GOES_HERE
Link to javascript console output: ___REPLACE_THIS__LINK_GOES_HERE
Screenshot/Video Links: ___REPLACE_THIS__LINKs_GO_HERE
If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps.
You can find various videos and tutorials by subscribing to my Youtube channel. You can also follow me on Twitter.
I can't do much without having a debug log (see the wiki here for details how to report an issue). I can give you a guess. Did you by chance use the 'Restart' function here:

If so, this is a known issue that is going to take some time to solve. Just use cancel instead and things should work correctly if this is your problem. Otherwise create a debug log according to the link above and upload it here.
Thanks for the reply.
No, I have not done a “RESTART” of the print. Although, I have paused and resumed a print with no issues.
I’ve attached the log file and a gcode file.
As I tried to indicate, after a system restart everything will print fine and the Octolapse plugin works. If I try to run the same exact print I get the fault. If I load a new print, I still get the fault. But if I restart the system again, the print will work and I don’t get the fault and Octolapse works correctly. It doesn’t make any difference if I’m in test mode or live print mode. As well, I have gotten the same results from several different prints.
Raspberry Pi 3B+
OctoPi 0.18.0
OctoPrint 1.4.0
OctoLapse 0.4.0
Python 2.7.16 (with ver. 2 dev. added)
Microsoft Edge Version 83.0.478.54 (Official build) (64-bit)
Windows 10 Build 18362.19h1
Please let me know if you need any more information.
Best Regards,
Nick DiPietro
Please attach the log via the github interface (reply to the email with an attachment won't work unfortunately), preferably using gist.github.com, then pasting a link in this issue. Thanks!
Also, attach your gcode file and settings.json. that will help me replicate your issue. Thanks again!
I’m not sure what the settings.json is or how to get it……
Regards,
Nick
From: FormerLurker [mailto:[email protected]]
Sent: Tuesday, June 23, 2020 1:27 PM
To: FormerLurker/Octolapse Octolapse@noreply.github.com
Cc: nadipietro nadipietro@cs.com; Author author@noreply.github.com
Subject: Re: [FormerLurker/Octolapse] File line number 14 was expected, but 9 was received! (#553)
Also, attach your gcode file and settings.json. that will help me replicate your issue. Thanks again!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/FormerLurker/Octolapse/issues/553#issuecomment-648304960 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQBW2KKISV26QYAIODJ73STRYDQYDANCNFSM4OF24HZA . https://github.com/notifications/beacon/AQBW2KJTVDYFO7JHJRD4IHDRYDQYDA5CNFSM4OF24HZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE2SFSQA.gif
Please see the wiki here for details how to report an issue, including how to get settings.json. It is step by step and quite detailed. Thanks!
That did it, thanks! Also, and I'm sorry to be asking for items piecemeal, but what plugins do you have installed? You can just post your octoprint.log file, which will contain this info. I'm asking because I took a look at your gcode file and can't figure out how the line numbers are getting messed up. If some plugin is stripping out commands (maybe some warm-up plugin?), that would explain it.
I get the same results if I preheat, or not.
So there are a lot of plugins in that list that alter the gcode stream. Obviously I need to figure something out that doesn't rely on the line numbers, but for now could you try disabling all other non-bundled plugins except Octolapse, then reboot and see if the issue persists. If it is a plugin compatibility issue perhaps I can replicate the issue and fix it if I know what plugins are causing the problem.
I know this is an arduous process, and I appreciate your willingness to give me so much info!
OK, I'll try to determine which, if any, are getting in the way
I'm in the middle of a print right now, but I'll test this when done.
I went through all of the 3rd party plugins. They all seemed to allow Octolapse to work correctly, except
"Restore Leveling After G28". Both X & Y crashed and i couldn't start the print, at all.
Perhaps you can see what's going wrong.
Thanks
OK, I see. I think that it's likely related to injecting gcode leading to line number changes. However, you can easily modify your start gcode to fix this without relying on the plugin. Just find G28 in your start gcode and replace it with this (including the G28) :
G28 ; Level Bed
M420 S1 ; Restore Leveling
Then, reslice and you should be good. Let me know if you have issues.
I had the same problem. Solved. Thanks.
I have a similar problem and fixed the first part with the M420 S1 but still I continue to get this error.
octolapse.timelapse - ERROR - File line number 15 was expected, but 10 was received!
This is the same one that showed up in the octoprint UI and as well as in the plugin log.
Please let me know what other info I can gather to help.
@marauderlabs, I would need to see your gcode file to make any progress debugging your issue.
Here it is, and the settings and log (with debug mode). The log for the current print starts at around line 280 in the log file.
CE3_tooth_top.gcode.zip
settings.json.zip
plugin_octolapse.log.zip
Thanks a ton, for your efforts!
@marauderlabs, did you disable the 'Restore Leveling After G28' plugin? That is the point of adding the M420 S1 command, to eliminate the need for that plugin.
FYI, there is NOTHING WRONG with that plugin, but the kind of injection it's doing screws up Octolapse's line number detection. At some point I'll ask @foosel if it's possible to add another bit of metadata to the hooks that tells me the file line number, not the the number of gcodes sent.
Fyi, you COULD also use the classic triggers, which do not need to know exactly which file line is being sent exactly. However, prints take a bit longer (depends a lot on the model), quality may be a bit lower, and you won't get a preview. As with everything, it's a trade-off.
Let me know if that helps.
@FormerLurker FYI, the fileline: should already be just that, unless I'm misunderstanding your request.
@foosel , I think we have touched on this before. I had trouble getting the existing metadata element to do what I wanted, but i can't for the life of me remember why exactly. I will double back on this. Thank you for the response! I hope we can catch up soon.
@FormerLurker I have removed the plugin. I didn't notice that the plugin too existed in my installation. Thanks for pointing out. I had 'Restore levelling after g28 in the firmware'. I had only removed that to test this. I wanted to understand if having that restoration in firmware would conflict with octolapse.
Would I need to inject M420 S1 in my gcode through the slicer in that case too for octolapse to not have trouble?
Yes, put it in the start gcode.
I'm trying to understand how this part functions. So if I run a gcode (say downloaded from the internet and doesn't have the level-restoration(m420) in it but my firmware executed it automatically on G28, would that be a problem for octolapse? (or only cases like injection by octolapse through a plugin would cause that trouble?
It is just the injection that messes up the snapshot plan. It is a limitation I hope to eliminate. Disabling that plugin will fix it. I assumed you needed the M420 because you have that plugin installed, which is why i suggested adding it to your start gcode instead of letting that plugin do it automatically. Maybe you don't need it though.
Glad I found this... I just disabled the plugin "Restore Leveling After G28" for now.
@fella5, this is a recurring issue that I'm hoping to fix. It affects a bunch of plugins, like cancel region. Another workaround if you want to use the restore leveling plugin is to switch to the 'Classic' triggers, which don't have this issue (but have other drawbacks).