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
RainingRusty
RainingRustyOPβ€’11mo ago
{% 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?
RainingRusty
RainingRustyOPβ€’11mo ago
See @miklschmidt updated the macro file a little while back with this. So guess he will have a look to update.
miklschmidt
miklschmidtβ€’11mo ago
You should not be on the development branch Please install v2.x
RainingRusty
RainingRustyOPβ€’11mo ago
Just ran the update as normal
miklschmidt
miklschmidtβ€’11mo ago
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)
RainingRusty
RainingRustyOPβ€’11mo ago
"2023-06-09-RatOS-2.0.2-raspberry-rpi64.img" This is what i used!! So how did I get on development image?
RainingRusty
RainingRustyOPβ€’11mo ago
No description
blacksmithforlife
blacksmithforlifeβ€’11mo ago
don't use the 64 bit image, use the 32 bit image
RainingRusty
RainingRustyOPβ€’11mo ago
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.
No description
blacksmithforlife
blacksmithforlifeβ€’11mo ago
yeah the 64 bit was removed because it caused a bunch of issues
RainingRusty
RainingRustyOPβ€’11mo ago
Then the official site should say so and make it clear that 64 bit is a "development image".
No description
RainingRusty
RainingRustyOPβ€’11mo ago
Total uncalled for when I have only praised your work and followed documentation at building this printer.....
miklschmidt
miklschmidtβ€’11mo ago
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?
RainingRusty
RainingRustyOPβ€’11mo ago
You just updated RatOS again and I have updated it again. Working now
miklschmidt
miklschmidtβ€’11mo ago
this one:
No description
miklschmidt
miklschmidtβ€’11mo ago
IT won't continue to, it's running the development branch on your machine for some reason
miklschmidt
miklschmidtβ€’11mo ago
It's supposed to say v2.x here, not development: vblablabla
No description
RainingRusty
RainingRustyOPβ€’11mo ago
No description
miklschmidt
miklschmidtβ€’11mo ago
Nothing in front?
RainingRusty
RainingRustyOPβ€’11mo ago
No description
miklschmidt
miklschmidtβ€’11mo ago
can you post the contents of your moonraker.conf ?
RainingRusty
RainingRustyOPβ€’11mo ago
Dont even know how to get on a "development image".... Still too stupid for github and sub realeases.....😁
miklschmidt
miklschmidtβ€’11mo ago
So this one is not the original moonraker.conf installed in the v2.0.2 image
RainingRusty
RainingRustyOPβ€’11mo ago
So how did i get this?
miklschmidt
miklschmidtβ€’11mo ago
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:
[update_manager client RatOS]
type: git_repo
path: ~/printer_data/config/RatOS/
primary_branch: development
origin: https://github.com/Rat-OS/RatOS-configuration.git
install_script: scripts/ratos-install.sh
managed_services:
klipper
moonraker
[update_manager client RatOS]
type: git_repo
path: ~/printer_data/config/RatOS/
primary_branch: development
origin: https://github.com/Rat-OS/RatOS-configuration.git
install_script: scripts/ratos-install.sh
managed_services:
klipper
moonraker
Not sure, it can't happen automatically/by accident (too many steps) Did someone tell you to change moonraker.conf?
RainingRusty
RainingRustyOPβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
That just reclones the repository, can't cause this That's very very strange
RainingRusty
RainingRustyOPβ€’11mo ago
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 updates
miklschmidt
miklschmidtβ€’11mo ago
yes 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.
RainingRusty
RainingRustyOPβ€’11mo ago
Again... I guarentee you I have not touched this file
miklschmidt
miklschmidtβ€’11mo ago
the 2.0.2 image uses a very different file, looks like this:
# Load the RatOS moonraker defaults
[include RatOS/moonraker.conf]

# If you use a non standard ip range in your local network,
# you can specify it under trusted_clients here.
[authorization]
cors_domains:
http://app.fluidd.xyz
https://app.fluidd.xyz
https://my.mainsail.xyz
http://my.mainsail.xyz
http://*.local
http://*.lan
http://localhost:3000
trusted_clients:
127.0.0.1
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.168.0.0/16
FE80::/10
::1/128
FD00::/8
# Load the RatOS moonraker defaults
[include RatOS/moonraker.conf]

# If you use a non standard ip range in your local network,
# you can specify it under trusted_clients here.
[authorization]
cors_domains:
http://app.fluidd.xyz
https://app.fluidd.xyz
https://my.mainsail.xyz
http://my.mainsail.xyz
http://*.local
http://*.lan
http://localhost:3000
trusted_clients:
127.0.0.1
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/12
192.168.0.0/16
FE80::/10
::1/128
FD00::/8
You can replace your moonraker.conf with that πŸ‘†
RainingRusty
RainingRustyOPβ€’11mo ago
Dont even know how to mod and I dont understand the API So this has happened automatically on the 64 bit
miklschmidt
miklschmidtβ€’11mo ago
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.
RainingRusty
RainingRustyOPβ€’11mo ago
I will move away from 64 ASAP
miklschmidt
miklschmidtβ€’11mo ago
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:
sudo ~/printer_data/config/RatOS/scripts/ratos-update.sh
sudo ~/printer_data/config/RatOS/scripts/ratos-update.sh
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 modified
miklschmidt
miklschmidtβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
Yet yours is different.
RainingRusty
RainingRustyOPβ€’11mo ago
Well, I have no reason to try bullshit you... I have not touch this file.
miklschmidt
miklschmidtβ€’11mo ago
Not saying you are, i'm just trying to find out what happened so i can prevent it in the future
RainingRusty
RainingRustyOPβ€’11mo ago
Would love to help. Logs somewhere?
miklschmidt
miklschmidtβ€’11mo ago
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 😦
RainingRusty
RainingRustyOPβ€’11mo ago
Tempted to install from same image and run updates again, as this is the ONLY way it is possible from my action that is
miklschmidt
miklschmidtβ€’11mo ago
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.
miklschmidt
miklschmidtβ€’11mo ago
Should be fixable by following those steps πŸ‘†
RainingRusty
RainingRustyOPβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
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 πŸ˜‚
blacksmithforlife
blacksmithforlifeβ€’11mo ago
what does your printer.cfg look like? Maybe you installed something which said to run a script and changed that stuff?
RainingRusty
RainingRustyOPβ€’11mo ago
Just notice this in the RATOS folder.... I never touch the files in there
No description
miklschmidt
miklschmidtβ€’11mo ago
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
RainingRusty
RainingRustyOPβ€’11mo ago
I think I shared too fast.... My bad, previous was inside the RatOS folder.....🫒 These are outside
blacksmithforlife
blacksmithforlifeβ€’11mo ago
did you run any scripts when you installed the beacon probe?
RainingRusty
RainingRustyOPβ€’11mo ago
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
blacksmithforlife
blacksmithforlifeβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
Aah, so the printer.cfg one is correct. That means something checked out the development branch in your RatOS folder. ie:
cd ~/printer_data/config/RatOS
git checkout development
cd ~/printer_data/config/RatOS
git checkout development
But... what could it be..
RainingRusty
RainingRustyOPβ€’11mo ago
for beacon i only ran the "BEACON_CALIBRATE" .... wont be that
miklschmidt
miklschmidtβ€’11mo ago
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…
RainingRusty
RainingRustyOPβ€’11mo ago
Nope. Beacon is the only probe I installed from day 1
miklschmidt
miklschmidtβ€’11mo ago
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
RainingRusty
RainingRustyOPβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
Turns out it wasn't modified, only the branch on ~/printer_data/config/RatOS was switched you can check the branch by doing:
cd printer_data/config/RatOS
git status
cd printer_data/config/RatOS
git status
It'll say what branch it is on on the first line, it should be v2.x absolutely fine to do
RainingRusty
RainingRustyOPβ€’11mo ago
No description
miklschmidt
miklschmidtβ€’11mo ago
that's on a new image?
RainingRusty
RainingRustyOPβ€’11mo ago
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
miklschmidt
miklschmidtβ€’11mo ago
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 πŸ™‚
RainingRusty
RainingRustyOPβ€’11mo ago
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.
miklschmidt
miklschmidtβ€’11mo ago
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.
RainingRusty
RainingRustyOPβ€’11mo ago
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)
fredbeauchamp
fredbeauchampβ€’11mo ago
Hello, I have the same problem and I don't know how to solve it.
No description
blacksmithforlife
blacksmithforlifeβ€’11mo ago
no, this is a different problem. I see you already created a post about it, hopefully someone will be be able to help soon
Want results from more Discord servers?
Add your server