Replace s.lstrip('file:') by re.sub(r'^file:', '', s).

Thanks @juztas (https://github.com/dmwm/CRABServer/issues/4566).