jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'TOOLHEAD'

Hello, please help me. I installed RatOS 2.1 on my custom printer and came across the fact that macros with the line "{% set toolhead = params.TOOLHEAD|int %}" do not work and the error "Error evaluating 'gcode_macro _TOOLHEAD_WAKEUP:gcode': jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'TOOLHEAD'". What needs to be fixed in the files so that the TOOLHEAD attribute is defined correctly?
7 Replies
TheTik
TheTik4mo ago
Did you complete the configurator?
Buror007
Buror007OP4mo ago
Yes, but unfortunately, when working with the configurator, I could not choose IDEX, because there were not enough outputs in my board due to the 3 Z axes (my printer has a 1Z motor, so there is enough board). Therefore, I manually adjusted the configuration file for IDEX. I understand that when selecting the usual configuration, there is no definition of the TOOLHEAD attribute in the root files. Is there any way to manually replace a file with attributes and where can I find it?
TheTik
TheTik3mo ago
Maybe try the other way around? Select IDEX and then fix the z motor assignment? Not sure what you mean by "root files", but overriding things in printer.cfg is always an option
Buror007
Buror007OP3mo ago
The problem is that due to the lack of motor outputs on my board, when selecting IDEX, the configurator does not allow me to finish the setup. or is there an option to change the number of Z axes in the configurator? By "root files" I mean files that are not in the config folder, but are located, for example, in the root folder of the clipper. If it is possible to change or add the TOOLHEAD parameter in the printer.cfg file, then please tell me what to write in this section?
TheTik
TheTik3mo ago
hmmm. So it is an IDEX machine with one Z stepper?
Buror007
Buror007OP3mo ago
Yes) One motor is connected by a belt to a 4 ball screws. I only need IDEX for JOIN SPOOLS, as there are large parts that lack a single coil of plastic. Please tell me, do I need to change something in the pause macro so that when the plastic in Toolhead 0 ends, Тoolhead 1 continues printing? I have an assumption that when pausing, the JOIN_SPOOLS macro is not activated, although I turn it on before printing.
TheTik
TheTik3mo ago
No idea, sorry. Hopefully someone with IDEX experience can chime in

Did you find this page helpful?