in reply to Invalid import file

The most likely cause is that the file is invalid.

As you don't show any code to reproduce your problem, it is hard to advise you further.

The best approach to get more relevant help is to show a short, self-contained example that reproduces the problem. If that's not possible, consider at least telling us the involved module that reports the "Invalid import File" and the real error message that Perl outputs.