0

I am using Windows, and running Processing 3.

I downloaded a french audiovisualizer, and it by default has a folder named "data" with a song.wav inside. When booting up the processing project it required me to make the project in its own folder, so I believe the location of the song.wav is different now.

So, I decided to do the reasonable thing and specify the full path of the song which changed the code from this:

  song = minim.loadFile("song.wav");

to

  song = minim.loadFile("C:\Users\*******\Downloads\ProcessingCubes-master\data\PulseWAV.wav");

(My user tag has been ommitted.)

But this returned the nasty error of:

processing.app.SketchException: Not expecting symbol 'U', which is LATIN CAPITAL LETTER U.
    at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:376)
    at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:155)
    at processing.mode.java.JavaBuild.build(JavaBuild.java:122)
    at processing.mode.java.JavaBuild.build(JavaBuild.java:104)
    at processing.mode.java.JavaMode.handleLaunch(JavaMode.java:122)
    at processing.mode.java.JavaEditor.lambda$0(JavaEditor.java:1099)
    at java.lang.Thread.run(Thread.java:748)

I'm not very familiar with processing, just decided to do it for this one project, so I don't know how to continue from here. Any help is appreciated.

Noah
  • 430
  • 1
  • 4
  • 21

1 Answers1

1

The backslash \ character is an escape character.

Escape characters let you use combinations like "\n" for newline or "\t" for tab.

Your error is telling you that "\U" is not a valid combination, so "C:\Users..." is not allowed.

To fix this, you need to escape the escape character. In other words, you need to use "\\" instead of "\".

"C:\\Users\\*******\\Downloads\\ProcessingCubes-master\\data\\PulseWAV.wav"

This is a common problem with Windows file paths. In my experience you can also use forward slashes:

"C:/Users/*******/Downloads/ProcessingCubes-master/data/PulseWAV.wav"

By the way, it's generally a good idea to google any error messages you don't understand. I tried googling "Not expecting symbol 'U', which is LATIN CAPITAL LETTER U." and got a couple results which look like they would have unblocked you.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
  • Thank you for that, I did google that error, and when looking at it again afterwords, I realized that this was caused by the escape character, but still did not know how to solve it. – Noah Aug 22 '20 at 05:27