OctoPrint-CameraStreamer-Control icon indicating copy to clipboard operation
OctoPrint-CameraStreamer-Control copied to clipboard

[OctoPrint 1.11.0rc1] jinja2.environment.TemplateModule object' has no attribute 'id'

Open tommywienert opened this issue 1 year ago • 3 comments

Hey there, the newest RC for the upcoming release is causing camera-streamer to not work. the error message from the browser console:

<div id="webcam_plugin_camerastreamer_control" data-bind="allowBindings: true" class="tab-pane active">
                        There was an error with the template tabs/control.jinja2 at line number 14: 'jinja2.environment.TemplateModule object' has no attribute 'id'
                    </div>```
If I switch back to webcam-classic, the webcam is showing.

OctoPi 1.0.0cam , Raspberry pi 4b, Firefox 134.0.2 on Ubuntu22.04

Greetings
Tommy

tommywienert avatar Jan 29 '25 19:01 tommywienert

Thanks for getting in touch. I don't currently have the ability to test the 1.11.0rc, so if anyone is able to figure out the issue & submit a PR that would be great.

cp2004 avatar Jan 29 '25 22:01 cp2004

I'll take a look, maybe it's also a regression on my end, have to check that anyhow :)

foosel avatar Jan 30 '25 09:01 foosel

It indeed appears to be related to the autoescape changes. Third party plugins are wrapped in an autoescape false block and THAT seems to be cause. I just disabled autoescaping and removed the wapper code as a experiment, and that makes the problem go away.

So, consider this an issue on my end. I'll also open a ticket on my end right away. Something in this setup is breaking macros.

foosel avatar Jan 30 '25 10:01 foosel