I think DavisW is right about checking first if you're analyzing correctly your rxn mixture.
If this doesn't solve the problem, the solvent may indeed be unsuitable as he suggested.
In fact, if the amine you're using is N,N-dimethyl-ethylenediamine (Me2NCH2CH2NH2), you have a zwitterionic intermediate coming from the 5-membered ring opening. Add the fact that the reaction produces water (yes, very little, but you never know)... it may be that this intermediate just precipitates in the highly lipophylic medium, and can't react further.
If you want to make phthalimide from phthalic anhydride, you just boil the latter in 32% aqueous ammonia and then heat it to 'death' on a flame (an old Vogel's didactic procedure). I guess they first form the intermediate amide-acid, and the final heating is meant to favour the elimination of water with cyclization to the imide.
Conclusion: you may try a water-miscible solvent or water itself. If you detect by MS the (M+H2O) compound, then you have to make it cyclize in some way.