Well, then this file does not contain any object of the type ElectronDensity. Maybe it's an ElectronDifferenceDensity?
Note that the task you are trying to achieve can actually be done in the GUI. Select all 3 objects in the Data view or LabFloor for older versions, and right-click and choose Open with > Grid Operations Analyzer. Then you can subtract them, and save the result.