Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Error “null is not an object” when trying to run scripts

  • Error “null is not an object” when trying to run scripts

    Posted by Ze’ev Gilad on September 5, 2017 at 1:26 pm

    I bought BG Renderer Pro from aescripts.com

    Since switching to a new machine, the script won’t even load. When I try to Window>BG Renderer, I get “Unable to execute script at line 94. null is not an object”

    Lloyd from aescripts said “You have a permissions issue with your macOS user account. AE needs to be able to read and write from the home folder. If that is blocked then you will get these types of errors. A common situation that causes this is when AE is installed from a different user account. ”

    I re-installed Ae, the script; I chowned and chmodded my home folder … nothing works.

    Any ideas?

    Jefry Arch replied 6 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Leopoldo Perizzolo

    September 10, 2017 at 10:14 am

    I suggest you take a look at the script; chances are that your AE copy is not in english and some effects that are applied inside the script are called with a non-universal name/parameter index, thus resulting in AE not recognizing those effects. You have 2 options:
    – change the language of your AE copy, by going into the folder Languages, then change the name (just the name) of the text file, inside the folder, from your language to the corresponding letters for english (I believe it’s EN_en, basically match the lower and upper case position);

    – edit the script ( this can be a long process depending on how many lines you need to change):
    Go inside the script folder, open up the script that you’ve installed (you should just be able to double click on it) and look at line 94 or whaterver line that give you issues; if it contains the english name of an effect, you have to change it; you can do so in two ways:
    – using the actual effect name the your AE copy uses; simply go on the internet and look up what english name corresponds to your language effect name, then change it;

    – using the corresponding effect on this list, which would make it work on any language; to do so you have to go to:
    https://www.redefinery.com/ae/fundamentals/effects/matchnames/index.php
    then look up to the effect name in your script and change it with the general name of the column “Match Name” of that web page.

    Once you’ve done that, you may have to change also the effect parameter name; once again, if you want to have the script work on any language, you have to use number as indexes; check this guide to understand how to implement it:
    https://forums.adobe.com/thread/1851692
    The index of the effect can be easily obtained by pressing alt+left click on the stopwatch for the effect parameter you want to know the index of, and look at the expression panel: you should see a line saying the name of the layer, the name of the effect followed by an index in parenthesys such as thisLayer.effect(“Fast blur”).(1) or something like that. You take that index number and replace the name of the parameter in the script with that number (e.g.: in the script, something like: effect(“Fast blur”)(“blurriness”) becomes effect(“Fast blur”)(1)). This is the long way but gives the best results.

    By far, the easiest option is to change the language, though be aware that you don’t just change the language, but also the effects order in the effect panel and also the workspace changes a bit.

    Or you can simply ask the seller; if it cares about the customer, it will change the script for you.

    Leopy

  • Jefry Arch

    April 16, 2020 at 7:23 am

    This error occurs when you read a property or call a method on a null object . That’s because the DOM API returns null for object references that are blank. An object is expected somewhere and wasn’t provided. So, you will get null is not an object error if the DOM elements have not been created before loading the script. In JavaScript , null is not an object; and won’t work. You must provide a proper object in the given situation.

    We can resolve this type of issues by adding an event listener that will notify us when the page is ready. Once the addEventListener is fired, the init() method can make use of the DOM elements.

    document.addEventListener(‘readystatechange’, function() {
    if (document.readyState === “complete”) {
    init();
    }

    https://net-informations.com/js/err/null.htm

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