Thonny a python IDE needs udisks2 plug without it the program has few functions not working properly. Here are some logs etc.
Traceback (most recent call last):
File "/snap/thonny/27/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
return self.func(*args)
File "/snap/thonny/27/lib/python3.10/site-packages/thonny/workbench.py", line 861, in _post_backend_menu
if uf2_device_is_present_in_bootloader_mode():
File "/snap/thonny/27/lib/python3.10/site-packages/thonny/plugins/micropython/uf2dialog.py", line 249, in uf2_device_is_present_in_bootloader_mode
for vol in list_volumes(skip_letters=["A"]):
File "/snap/thonny/27/lib/python3.10/site-packages/thonny/misc_utils.py", line 105, in list_volumes
mount_points = list_volumes_sync()
File "/snap/thonny/27/lib/python3.10/site-packages/thonny/udisks.py", line 19, in list_volumes_sync
return loop.run_until_complete(list_volumes())
File "/snap/thonny/27/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/snap/thonny/27/lib/python3.10/site-packages/thonny/udisks.py", line 44, in list_volumes
block_devices = await interface.call_get_block_devices({})
File "/snap/thonny/27/lib/python3.10/site-packages/dbus_next/aio/proxy_object.py", line 92, in method_fn
BaseProxyInterface._check_method_return(msg, intr_method.out_signature)
File "/snap/thonny/27/lib/python3.10/site-packages/dbus_next/proxy_object.py", line 62, in _check_method_return
raise DBusError._from_message(msg)
dbus_next.errors.DBusError: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.167" (uid=1000 pid=28390 comm="/snap/thonny/27/bin/python3.10 -I -m thonny " label="snap.thonny.thonny (enforce)") interface="org.freedesktop.UDisks2.Manager" member="GetBlockDevices" error name="(unset)" requested_reply="0" destination="org.freedesktop.UDisks2" (uid=0 pid=1286 comm="/usr/libexec/udisks2/udisksd " label="unconfined")
After manually adding the plug it doesn’t happen.
Few thing to highlight need of this plug by thonny snap ;
Plus snappy-debug also recommends the plug, if this plug cant be granted any alternate solution to fix this will be fine. Thanks