Open toniaguirre opened 8 years ago
What do you have inside inputs/ ? The error occurs when testing that the input files are supported image file types. Make sure there are no files without an extension (such as "filename" instead of "filename.txt"). It looks like the code breaks when the filename has no extension.
Just to document this: Line 119 in utils.lua fails if the filename checked has no extension. Tested in th:
th> filename = "inputs/kukkuu"
[0.0001s]
th> ext = string.lower(paths.extname(filename))
[string "ext = string.lower(paths.extname(filename))"]:1: bad argument #1 to 'lower' (string expected, got no value)
stack traceback:
[C]: in function 'lower'
[string "ext = string.lower(paths.extname(filename))"]:1: in main chunk
[C]: in function 'xpcall'
/home/hannu/torch/install/share/lua/5.1/trepl/init.lua:670: in function 'repl'
...annu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: at 0x00406670
Looks like this would work:
ext = string.lower(paths.extname(filename) or "")
thank you very much @htoyryla . You were completely right. I had some folders inside the input folder, as well as a .mov file. I really appreciate your fast respond, wish you the best!
I think we should perhaps leave this open because the problem is still in the code and could be corrected.
Hi guys! So I have used the normal neural-style code for some weeks, and now I am trying this one. For some strange reason, when I use as inputs individual files, it runs without problems. However, when I try to use folders as inputs I get an error:
bad argument #1 to 'lower'
. I searched on the internet and the only thing I can find is this: https://github.com/jcjohnson/neural-style/issues/62, but I really don't understand the solution posted by this guys. I post what I run and what I get: