Seven Stars RAJ
Seven Stars

ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

 I am getting the following error

"Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"  

Screenshot (929).png

I don't know how to handle that error.

Thanks
RAJ
1 ACCEPTED SOLUTION

Accepted Solutions
Ten Stars

Re: ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

One of your components contains a string with a \ character. That is used as an escape character in Java strings. If you want a literal \ in your string, you need to escape the escape character and type \\
4 REPLIES
Moderator

Re: ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

Hello,

When you get some compile errors, please check your "Code" tab in your job. There will be your compile error highlighted in red line.

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

Re: ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

One of your components contains a string with a \ character. That is used as an escape character in Java strings. If you want a literal \ in your string, you need to escape the escape character and type \\
One Star

Re: ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

 {" +
" \"id\": \"DEV_A2_001\"," +
" \"value\": \"The device plugs into the vehicle's diagnostics port for your vehicle, which is typically under the dashboard on the driver's side.\\Some vehicles have the diagnostics port access in unusual spots. Find your vehicle's port location.\\If you still have difficulty locating your vehicle's diagnostics port or installing your device, please call the customer team at 877-389-0047.\"," +
" \"formatType\": \"text/plain\"," +
" \"encoding\": \"UTF8\"," +
" \"tagName\": \"\"" +
" }"

My code is also showing the same error...can you elaborate how to deal with invalid escape sequence....I saw your answer..but still confused..plzz hep
Five Stars

Re: ERROR SHOWING LIKE "Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \ )"

As it is said above escape the escape character. i had the same error but got it resolved.

 

e,g: "C:\Users\tr5677\Desktop" if this is your output path.

change it to 

 

"C:\\Users\\tr5677\\Desktop".

 

error was gone after this.