Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Using tFileInputMail - invalid escape sequence error

Hello there,
I am trying to develop code that reads an email file on my desktop, extracts key fields from the email and displays the values on the console. I am using the tFileInputMail and tLogRow components. I received the following errors while executing it. Please help!

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )





at xyz.reademail_0_1.Reademail.tFileInputMail_1Process(Reademail.java:520)

at xyz.reademail_0_1.Reademail.runJobInTOS(Reademail.java:1276)

at xyz.reademail_0_1.Reademail.main(Reademail.java:1133)
Labels (3)
1 Solution

Accepted Solutions
cterenzi
Specialist
Specialist

File path references in Java must either be formatted as: 
"C:/Users/hkamara2/Desktop/Emails/20141204-173946_1.mail"
OR
"C:\\Users\\hkamara2\\Desktop\\Emails\\20141204-173946_1.mail"

View solution in original post

7 Replies
Anonymous
Not applicable
Author

Hi hkstrz,
Could you please share us your tFileInputMail component setting screenshot with us?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hey Sabrina,
Thanks for replying. Uploaded the screenshot.
Best,
Hema
Anonymous
Not applicable
Author

Hey Sabrina,
Thanks for replying. Uploaded the screenshot.
Best,
Hema
Anonymous
Not applicable
Author

 
Hey Sabrina,
Thanks for replying. Uploaded the screenshot.
Best,
Hema

having some trouble with attaching an image. Here are the settings.

File Name: "C:\Users\hkamara2\Desktop\Emails\20141204-173946_1.mail"
Schema: Built-in
Mail-type : MIME
Attachment export directory - "C:\Users\hkamara2\Desktop\Emails"
Mail parts -

Column               Mail part
Date                       Date
Author                   Author
Object                   Object


Nothing under the Multivalues column is ticked.
Anonymous
Not applicable
Author

You are in java, you need to either flip your slashes so they are not escape characters, or add another slash to them for a literal "\".
Anonymous
Not applicable
Author

please can anybody explain me why this error occurs
cterenzi
Specialist
Specialist

File path references in Java must either be formatted as: 
"C:/Users/hkamara2/Desktop/Emails/20141204-173946_1.mail"
OR
"C:\\Users\\hkamara2\\Desktop\\Emails\\20141204-173946_1.mail"