Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail in main.lua : main.lua:52: '=' expected near 'continue' #157

Closed
gernhard1337 opened this issue Dec 14, 2020 · 11 comments
Closed

Fail in main.lua : main.lua:52: '=' expected near 'continue' #157

gernhard1337 opened this issue Dec 14, 2020 · 11 comments

Comments

@gernhard1337
Copy link

Hello!
I am trying to get this to work for now 2 weeks. Today it got it as far as never, to fail again :c
However, first of all, i followed this script: #141
Had some errors while installing but i got everything to install and build.

Now if i type ./run.sh i get the same error as in Matlab.
Matlab gives :
/home/tom/usr/local/torch/install/bin/lua: main.lua:52: '=' expected near 'continue'
stack traceback:
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: ?
Error using run (line 38)
Failed to run Torch7 script.

and ./run.sh gives:

tom@tom-OMEN-by-HP-Laptop:~/usr/local/vrn$ ./run.sh
/home/tom/usr/local/torch/install/bin/lua: main.lua:52: '=' expected near 'continue'
stack traceback:
[C]: in function 'dofile'
.../torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: ?
ls: cannot access *.txt: No such file or directory
ls: cannot access *.raw: No such file or directory

Does someone know how to resolve this? I am really at the end of my knowledge and wasted almost 2 weeks bugfixing..
Thanks already for your help!

@AaronJackson
Copy link
Owner

AaronJackson commented Dec 14, 2020 via email

@gernhard1337
Copy link
Author

the code is fresh cloned without any change from my side.
So there cant be an error with the code or am i wrong?
And on line 52 is no "="
line52 is :
if(#detectedFaces<1) then goto continue end

@gernhard1337
Copy link
Author

gernhard1337 commented Dec 14, 2020

edited the main.lua file and managed to resolve to a new error. not it is
libstdc++.so.6: version GLIBCXX_3.4.18' not found (required by /home/tom/usr/local/torch/install/lib/lua/5.1/fb/python/lib.so)
i will try to install this now.

but ./run.sh shows something very different:

tom@tom-OMEN-by-HP-Laptop:~/usr/local/vrn$ ./run.sh
Fatal Python error: PyEval_SaveThread: NULL tstate
./run.sh: line 30: 19108 Aborted (core dumped) th main.lua -model 2D-FAN-300W.t7 -input ../$INPUT/ ``-detectFaces true -mode generate -output ../$INPUT/ -device gpu -outputFormat txt
ls: cannot access *.txt: No such file or directory
ls: cannot access *.raw: No such file or directory

@AaronJackson
Copy link
Owner

AaronJackson commented Dec 14, 2020 via email

@gernhard1337
Copy link
Author

i am running Ubuntu 14.04 like in #141
i will try that too, thanks!

@gernhard1337
Copy link
Author

i used Matlab2015a before, now i downloaded 2019a where the GLIBCXX_3.4.18 is included.
Now Matlab throws the same error as ./run.sh

/bin/bash: line 1: 22358 Segmentation fault (core dumped) CUDA_VISIBLE_DEVICES=0 th main.lua -model 2D-FAN-300W.t7 -input ../examples/ -detectFaces true -mode generate -output ../examples/ -device gpu -outputFormat txt 2>&1 > /dev/null cd face-alignment;CUDA_VISIBLE_DEVICES=0 th main.lua -model 2D-FAN-300W.t7 -input ../examples/ -detectFaces true -mode generate -output ../examples/ -device gpu -outputFormat txt 2>&1 > /dev/null;: Segmentation fault Error using run (line 38) Failed to run Torch7 script.

i already recompiled fp.python. Nothing changed

@AaronJackson
Copy link
Owner

AaronJackson commented Dec 14, 2020 via email

@gernhard1337
Copy link
Author

yes i hoped to get with #141 something more since the old readme is not up-to-date

that shoudlnt be a problem then since i got a Geforce GTX1070 (Laptop) should work then i guess?

@gernhard1337
Copy link
Author

It is now working with the guide from #141 despite i needed to use a different way in installing cuda. I am running GTX1070 which needs a newer driver than in #141. What worked for me was : install Driver bundled with the Cuda 10.1 version. After this it worked!
Another Question: i am kinda new to this topic but will work myself into it. Which Program can i use to see the model?
The models are shown after ./run.sh but i would like to see them in Blender or some program like this.
Blender does not work. Is there a other program for this?

Thanks already and have a great new year in case u answer later.

@AaronJackson
Copy link
Owner

If you are still having issues, please give the https://github.com/AaronJackson/vrn-docker image a try. It's available on DockerHub but see the repo for docs.

@xiaoschannel
Copy link

xiaoschannel commented Feb 2, 2022

the code is fresh cloned without any change from my side. So there cant be an error with the code or am i wrong? And on line 52 is no "=" line52 is : if(#detectedFaces<1) then goto continue end

In case anyone's wondering '=' expected near 'continue' happens because you're running goto in an old version of lua before goto was introduced, e.g. 5.1. To solve this you can rewrite the control flow to avoid goto, or use a newer version of lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants