I had the same problem. One of these did the trick:
1. Changed the script name in Tools->Script Editor
2. Changed some random properties in script editor project porperties
3. Hardcoded my domain-name and login details into the CF7TODBDATA-function so it doesn’t fail when it’s run without arguments (in editor or tools->script manager)
Not sure which one. But it seems like there’s a bug in the script editor…