We can't be specific without seeing the code (and probably the data) which generate the error, but basically, it probably means that you have tried to use an illegal character in the file name; for example, the following are not permitted in file names by the Windows operating system:
\ / : * ? " < > |
Other systems may restrict other characters.