Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Invalid node index

  • Invalid node index

    Posted by Obed Ampong on November 12, 2019 at 7:58 pm

    Hello,

    Please, I need some help. After Effects is not able to read the last value from the CSV file. It displays invalid note index error.
    Thanks

    Regards,
    Obed

    screenshot4.png

    idx = parseInt(thisComp.name.match(/\d+/),10);
    endCount = footage("Työkirja1.csv").dataValue([idx,thisLayer.index]);

    Obed Ampong replied 6 years, 5 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    November 12, 2019 at 8:26 pm

    What does your CSV file look like?

    Dan

  • Obed Ampong

    November 12, 2019 at 8:55 pm

    Hello Dan,

    Please this is the CSV data.

    Season,Apps,Starts,Min,Mn/Ap,Gls,Ast,PK,PKatt,SoT,Fls,CrdY,CrdR,Gls,G+A,G-PK,G+A-PK,SoT,Squad,Age
    2002-2003,25,11,1080,43,3,3,0,0,15,,1,0,0.25,0.5,0.25,0.5,1.25,Sporting CP,17
    2003-2004,34,18,1839,54,4,7,0,0,25,20,4,1,0.2,0.54,0.2,0.54,1.22,Manchester Utd,18
    2004-2005,40,31,2925,73,5,8,0,0,68,34,4,0,0.15,0.4,0.15,0.4,2.09,Manchester Utd,19
    2005-2006,39,30,2792,72,9,6,0,0,56,35,9,1,0.29,0.48,0.29,0.48,1.81,Manchester Utd,20
    2006-2007,45,42,3753,83,20,17,3,4,93,25,5,0,0.48,0.89,0.41,0.82,2.23,Manchester Utd,21
    2007-2008,45,42,3762,84,39,8,5,6,110,27,7,1,0.93,1.12,0.81,1,2.63,Manchester Utd,22
    2008-2009,45,42,3753,83,22,8,4,4,99,35,8,1,0.53,0.72,0.43,0.62,2.37,Manchester Utd,23
    2009-2010,35,33,2911,83,33,8,4,5,109,41,4,2,1.02,1.27,0.9,1.14,3.37,Real Madrid,24
    2010-2011,46,44,3936,86,46,13,9,9,127,39,4,0,1.05,1.35,0.85,1.14,2.9,Real Madrid,25
    2011-2012,48,47,4280,89,56,15,14,15,141,37,5,0,1.18,1.49,0.88,1.2,2.96,Real Madrid,26
    2012-2013,46,42,3796,83,46,11,6,7,159,37,10,0,1.09,1.35,0.95,1.21,3.77,Real Madrid,27
    2013-2014,41,41,3527,86,48,14,8,9,151,29,5,1,1.22,1.58,1.02,1.38,3.85,Real Madrid,28
    2014-2015,50,49,4372,87,61,20,13,16,136,37,6,1,1.26,1.67,0.99,1.4,2.8,Real Madrid,29
    2015-2016,48,48,4291,89,51,15,8,9,146,33,4,0,1.07,1.38,0.9,1.22,3.06,Real Madrid,30
    2016-2017,44,44,3917,89,38,12,6,7,90,24,5,0,0.87,1.15,0.74,1.01,2.07,Real Madrid,31
    2017-2018,42,40,3488,83,42,7,7,8,110,25,5,1,1.08,1.26,0.9,1.08,2.84,Real Madrid,32
    2018-2019,43,41,3645,85,28,10,6,7,84,27,4,1,0.69,0.94,0.54,0.79,2.07,Juventus,33
    2019-2020,14,14,1217,87,6,2,2,2,35,9,0,0,0.44,0.59,0.3,0.44,2.59,Juventus,34

    Thanks

    Regards,

    Obed

  • Dan Ebberts

    November 12, 2019 at 9:31 pm

    You only have 18 rows of data, but that expression is trying to get to the 19th row (using the layer’s index of 18).

    Dan

  • Obed Ampong

    November 12, 2019 at 10:09 pm

    Hello Dan,

    Please, then I am using the wrong expression. If you can see from the graph, one of them is missing . Could kindly help me with the correct expression for After Effects to read all the values? It look like, it skip the first cell after the heading.

    Thanks,

    Regards,

    Obed.

  • Dan Ebberts

    November 12, 2019 at 10:13 pm

    Did you add some other type of layer as layer 1? That would cause what you’re seeing. You could modify the expression to use

    …dataValue([idx,thisLayer.index-1]);

    instead of

    …dataValue([idx,thisLayer.index]);

    Dan

  • Obed Ampong

    November 12, 2019 at 10:24 pm

    WOW. DAN THANKS, IT WORKED

    REGARDS,

    OBED

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy