Error on attaching file

When I try to attach a file, I get this error message:


The message appears when I click the Attachment paperclip, but clicking OK lets me attach the file as normal.
This only seems to happen the first time I try to attach in a session.