[resolved] Using tFileInputMail - invalid escape sequence error

One Star

[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)

Accepted Solutions
Ten Stars

Re: [resolved] Using tFileInputMail - invalid escape sequence error

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"

All Replies
Moderator

Re: [resolved] Using tFileInputMail - invalid escape sequence error

Hi hkstrz,
Could you please share us your tFileInputMail component setting screenshot with us?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Using tFileInputMail - invalid escape sequence error

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

Re: [resolved] Using tFileInputMail - invalid escape sequence error

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

Re: [resolved] Using tFileInputMail - invalid escape sequence error

 
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.
Seven Stars

Re: [resolved] Using tFileInputMail - invalid escape sequence error

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 "\".
One Star

Re: [resolved] Using tFileInputMail - invalid escape sequence error

please can anybody explain me why this error occurs
Ten Stars

Re: [resolved] Using tFileInputMail - invalid escape sequence error

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"

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog