Friendly reminder: don't use sketchPath() before setup()!

I always forget this, then I get desperate searching the forums and thinking I must be doing something wrong, and looking at older sketches where it worked just fine, jut to realize this:

print(sketchPath('data'))  # wrong!

def setup():
    print(sketchPath('data'))

Result:

/home/villares/processing-3.5.4/data  <-this is wrong!
/home/villares/sketchbook/sketch_2020_10_28c_sketchPath/data

2 Likes