entities similar to #5758401 error in debug view when running via pyramid