RatOs Update - gcode macro problem
Anyone else get this error after the last update?
Klipper reports: ERROR
Error loading template 'gcode_macro CALIBRATE_ADAPTIVE_MESH:gcode': jinja2.exceptions.TemplateSyntaxError: unexpected char '&' at 3569
72 Replies
{% if printer.configfile.settings.beacon is defined && printer.configfile.settings.beacon.mesh_runs % 2 != 0 and probe_first %}
{% set probe_first = false %}
{% else if printer.configfile.settings.beacon is defined && printer.configfile.settings.beacon.mesh_runs % 2 == 0 and not probe_first %}
Are these two line have "&&" not supposed to be "and" rather?
looks like it according to https://docs.rewst.help/documentation/jinja/common-jinja-examples/conditional-statements-and-logical-operators#example-using-logical-operators-in-jinja
&&
is more from C type syntax languagesSee @miklschmidt updated the macro file a little while back with this. So guess he will have a look to update.
You should not be on the development branch
Please install v2.x
Just ran the update as normal
Yes, but you've installed a development image
I've warned about this several times
please install a stable release (2.0.2 as of this moment)
"2023-06-09-RatOS-2.0.2-raspberry-rpi64.img" This is what i used!!
So how did I get on development image?
don't use the 64 bit image, use the 32 bit image
From what I can see, I have downloaded this correctly as was the documentation from day 1 and now the 64 bit is removed. from there I and just ran updates since day 1.....
So I have not installed the developer image and you are welcome to watch my video streamed for ALL to see.
yeah the 64 bit was removed because it caused a bunch of issues
Then the official site should say so and make it clear that 64 bit is a "development image".
Total uncalled for when I have only praised your work and followed documentation at building this printer.....
Sorry not minded on you specifically i've just had quite a few of these today
Okay this is strange i admit
what does it say under RatOS in the update manager pane?
You just updated RatOS again and I have updated it again. Working now
this one:
IT won't continue to, it's running the development branch on your machine for some reason
It's supposed to say v2.x here, not
development: vblablabla
Nothing in front?
can you post the contents of your moonraker.conf ?
Dont even know how to get on a "development image".... Still too stupid for github and sub realeases.....π
So this one is not the original moonraker.conf installed in the v2.0.2 image
So how did i get this?
This has been heavily modified:
1) You've copy pasted everything from
RatOS/moonraker.conf
2) You've changed the primary branch of RatOS to:
Not sure, it can't happen automatically/by accident (too many steps)
Did someone tell you to change moonraker.conf?At a stage I had a priblem with some of the files and selected "Hard Recovery" I think
Never have I self edited this file
Stuck to your rules ALL the way
That just reclones the repository, can't cause this
That's very very strange
only mod's done ares in printer.cfg in the user section
Also since last week getting this warning:
Moonraker warning
[update_manager]: Failed to load extension RatOSKinematics: Invalid path for option
path
in section [update_manager RatOSKinematics]: Path /home/pi/ratos-kinematics
does not exist
was after one of the updatesyes that's because you're on the development branch π
It's supposed to be running 2.1
π
The change that's causing these problems is specific to moonraker.conf
You can check in there when it's last been modified
Maybe that'll jog some memories?
My guess is someone told you to replace the contents or something
I did a quick search here, but can't find anything mentioning such modifications.
Again... I guarentee you I have not touched this file
the 2.0.2 image uses a very different file, looks like this:
You can replace your moonraker.conf with that π
Dont even know how to mod and I dont understand the API
So this has happened automatically on the 64 bit
If you do that it'll be mad at you because the RatOS repository is checked out with the wrong branch, you can do a hard recovery to get it back to v2.x.
I will move away from 64 ASAP
Then what you'd want to do afterwards is ssh in (win + r, type "cmd", hit enter, then write
ssh [email protected]
or ssh [email protected]
and hit enter, password is raspberry
) and run:
That's not possible. The 64-bit image was compiled from the same code, just a different raspberry pi os base image.
That moonraker.conf was manually modifiedAS you can see, this file hasn't been modified in 2 years: https://github.com/Rat-OS/RatOS/blob/v2.x/src/modules/moonraker/filesystem/home/pi/printer_data/config/moonraker.conf
GitHub
RatOS/src/modules/moonraker/filesystem/home/pi/printer_data/config/...
The preconfigured Raspberry Pi image that makes it easy to run Klipper + Moonraker + Mainsail on your printer. - Rat-OS/RatOS
Yet yours is different.
Well, I have no reason to try bullshit you... I have not touch this file.
Not saying you are, i'm just trying to find out what happened so i can prevent it in the future
Would love to help. Logs somewhere?
for all i know it could be some random guide on a blog somewhere that told you you had to replace moonraker.conf, or maybe some extension that replaced it or what have we
Could be literally anything
Not audit logs like that unfortunately, no
I guess we might never know π¦
Tempted to install from same image and run updates again, as this is the ONLY way it is possible
from my action that is
Anyway, with the steps i lined out above (https://discord.com/channels/582187371529764864/1194366211593621625/1194393912446554263 and https://discord.com/channels/582187371529764864/1194366211593621625/1194394089626534058 and https://discord.com/channels/582187371529764864/1194366211593621625/1194394207285166170) You should be back to original v2.x state.
Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Should be fixable by following those steps π
Will look, but think I will drop to 32bit as 64bit is not on the download as a "new user" would experience. Have a few other channels that people follow my progress and dont want anymore surprises...
Thanks
It's probably a good idea regardless, yes. We've had too many random problems with the 64-bit version.
np, sorry for the third degree interrogation, i just really need to get to the bottom of this π
what does your printer.cfg look like? Maybe you installed something which said to run a script and changed that stuff?
Just notice this in the RATOS folder.... I never touch the files in there
Those are supposed to be there. the moonraker.conf file outside the RatOS directory includes the last one in that picture.
Or rather, it's supposed to
Wait did you paste the contents of the one next to printer.cfg or the one from the RatOS folder?
Can you post the contents of moonraker.conf outside RatOS (the one in the same directory as printer.cfg), just to make sure
I think I shared too fast.... My bad, previous was inside the RatOS folder.....π«’
These are outside
did you run any scripts when you installed the beacon probe?
possibly to calibrate but thats from inside mainsail
Dont normally ssh into PI... let me check the history of the ssh session...
Nothing via ssh done except updateing config.txt to get the BTT HDMI5 to work
scripts run can still update files even if via mainsail
I guess to really get down to the bottom of this, reinstall using the image you originally downloaded, after each step check to see if moonraker.conf has changed to the development branch
Aah, so the printer.cfg one is correct. That means something checked out the development branch in your RatOS folder.
ie:
But... what could it be..
for beacon i only ran the "BEACON_CALIBRATE" .... wont be that
Did you ever try out the Klicky probe and followed this guide? https://3dpandme.com/2022/06/24/klicky-release-for-eva3-and-eva2-on-the-vcore3/
dmason
3DP and Me
Klicky release for EVA3 and EVA2 on the VCore3
Intro What is a Klicky probe? Why do I need one? How do I get one? Is there a mount available? Just some of the questions people ask when the words Klicky probe are mentioned on the Discord channelβ¦
Nope. Beacon is the only probe I installed from day 1
Fair enough, only thing i could think of that asked people to do stuff they shouldn't π
contacted dave to have him fix that article
I will take a new SD card on the weekend and run through it again and see if I land up with a modified moonraker file
I will also watch my streams again and see if I notice anything.
Only step I did different at installation (the second time once BTT Octopus MAX was included), was to first update RATOS before flashing process and initial config
Turns out it wasn't modified, only the branch on
~/printer_data/config/RatOS
was switched
you can check the branch by doing:
It'll say what branch it is on on the first line, it should be v2.x
absolutely fine to dothat's on a new image?
only ever used the same image.
Will use same image on the weekend and see what it does.
after 2am in the morning here now
Right, wanted to know if that was a new installation or your current one, because it should say "v2.x" after a fresh install.
I assume the current one then
Let me know when you get to it π
Will do
Just a update. I setup another sd card that I had and used the exact same image I used last year as it was still on my PC I stream with.
Well, after all the updates and making sure everything is working again....."git Status" is still returning "On branch v2.x" which we expected and so have no answer as to how I have the other SD switch to "Developer"......
So, I continue to wonder... In fact, still not sure how to switch from official release to developer release, even if I wanted to....
Mystery unsolved, but back on official release.
I think i might have found an answer to the mystery. I swapped the "active branch" on github to development a month or so ago, and it seems that if you execute a hard reset through mainsail/moonraker, it clones the repository with that branch and never checks out the branch that's configured in the moonraker configuration. That's quite unfortunate.
Seems like a bug in moonraker, but not entirely sure.
Ah, that makes me feel less crazy.... I know I did not do anything different...
I do however check for updates almost every second day while I am still doing the final configs to my printer's build. So would most difinately had updated in this period you spoke about.
Nevertheless... Was good practice to rebuild config one more time.
oh, and yes.... I have done a few "hard resets" since the start and did not understand why this happened.... Well, I was on the development branch and so explains the reset from time to time for me. (or at least for my head it does)
Hello, I have the same problem and I don't know how to solve it.
no, this is a different problem. I see you already created a post about it, hopefully someone will be be able to help soon