ebu / ebu-tt-live-toolkit

Toolkit for supporting the EBU-TT Live specification
http://ebu.github.io/ebu-tt-live-toolkit/
BSD 3-Clause "New" or "Revised" License
25 stars 10 forks source link

Python 3: "make template" fails #532

Open spoeschel opened 4 years ago

spoeschel commented 4 years ago

Currently the template make target (also invoked as part of the all target) of the release/3.0 branch fails:

$ make template
npm update nunjucks
node_modules/nunjucks/bin/precompile ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.xml > ebu_tt_live/ui/user_input_producer/template/user_input_producer_template.js
/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:114
  name = name.replace(/\\/g, '/');
              ^

TypeError: name.replace is not a function
    at _precompile (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:114:15)
    at precompile (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/src/precompile.js:85:22)
    at Object.<anonymous> (/home/stefan/DL-Source/ebu-tt-live-toolkit3/node_modules/nunjucks/bin/precompile:45:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
Makefile:35: recipe for target 'template' failed
make: *** [template] Error 1

It seems that the name option of the precompile script of Nunjucks (v3.2.1) plays a role - though the option is optional if a file is specified, as far as I can see.

nigelmegitt commented 4 years ago

Thanks @spoeschel I'll look to see if we've fixed this in our fork.

nigelmegitt commented 4 years ago

Ah, no, we haven't. I can reproduce this.

johnjcamilleri commented 4 years ago

Same issue here, it's nothing to do with your Python version (as issue title implies). I got around it with:

npm install nunjucks@3.2.0

(instead of npm install nunjucks).