Hi,
I had the same problem after migrating from Bullseye to Bookworm OS and was able to solve it as follows:
- Extract “emoncms.sql” from your “emoncms-backup-name-date.tar.gz” backup archive
- Edit this file and remove the first line “/*M!999999- enable the sandbox mode */ ”
- Save this file back into the archive
- Import the modified archive
An explanation of the compatibility problem can be found here