gl-inet / imagebuilder

Warning!Please look at 'GL.iNET Imagebuilder Introduction' section.
96 stars 45 forks source link

Multiple erros in gl_image file #4

Closed theBASTI0N closed 4 years ago

theBASTI0N commented 4 years ago

Unable to run command "./gl_image -p mifi -e "openssh-sftp-server nano htop""

I have done a fresh install and have all the prerequisites installed.

First issue at: File "./gl_image", line 105 print "Oops! Failed to parse %s" % self.filename ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Oops! Failed to parse %s" % self.filename)?

Once I corrected the issues with misisng parentheses there are still more issues preeventing the command to run.

lancersky commented 4 years ago

Hi, Can you check the configuration glinet/images.json is exist?

theBASTI0N commented 4 years ago

It is a fresh clone, the only files I have are:

bash-5.0$ cd imagebuilder/ bash-5.0$ ls customize.json gl_image README.md

Nothing else has been pulled yet

lancersky commented 4 years ago

It should be auto download glinet repository. $ ./gl_image -p mifi -e "openssh-sftp-server nano htop" Cloning into 'glinet'... remote: Enumerating objects: 270, done. remote: Counting objects: 100% (270/270), done. remote: Compressing objects: 100% (230/230), done. Receiving objects: 2% (201/10034), 36.01 KiB | 9.00 KiB/s

theBASTI0N commented 4 years ago

The issue is that the gl_image file can't be run due to the errors in it, meaning the auto download cannot start.

lancersky commented 4 years ago

$ git clone https://github.com/gl-inet/imagebuilder.git Cloning into 'imagebuilder'... remote: Enumerating objects: 52, done. remote: Counting objects: 100% (52/52), done. remote: Compressing objects: 100% (35/35), done. remote: Total 52 (delta 27), reused 38 (delta 15), pack-reused 0 Unpacking objects: 100% (52/52), done. Checking connectivity... done. lancer@gl-inet:~/test$ lancer@gl-inet:~/test$ cd imagebuilder lancer@gl-inet:~/test/imagebuilder$ lancer@gl-inet:~/test/imagebuilder$ ./gl_image -p mifi -e "openssh-sftp-server nano htop" Cloning into 'glinet'... remote: Enumerating objects: 270, done. remote: Counting objects: 100% (270/270), done. remote: Compressing objects: 100% (230/230), done. remote: Total 10034 (delta 78), reused 230 (delta 40), pack-reused 9764 Receiving objects: 100% (10034/10034), 1.12 GiB | 15.10 MiB/s, done. Resolving deltas: 100% (3466/3466), done. Checking connectivity... done. Update glinet repository ...... Already up-to-date. Cloning into 'imagebuilder/3.1/openwrt-imagebuilder-ar71xx-generic_3.1'... remote: Enumerating objects: 2517, done. remote: Counting objects: 100% (2517/2517), done. remote: Compressing objects: 100% (1517/1517), done. remote: Total 2517 (delta 788), reused 2517 (delta 788), pack-reused 0 Receiving objects: 100% (2517/2517), 49.92 MiB | 10.49 MiB/s, done. Resolving deltas: 100% (788/788), done. Checking connectivity... done. Generating package index...

theBASTI0N commented 4 years ago

This is what I get :

bash-5.0$ git clone https://github.com/gl-inet/imagebuilder.git Cloning into 'imagebuilder'... remote: Enumerating objects: 52, done. remote: Counting objects: 100% (52/52), done. remote: Compressing objects: 100% (35/35), done. remote: Total 52 (delta 27), reused 38 (delta 15), pack-reused 0 Unpacking objects: 100% (52/52), done. bash-5.0$ cd imagebuilder/ bash-5.0$ ./gl_image -p mifi -e "openssh-sftp-server nano htop" File "./gl_image", line 105 print "Oops! Failed to parse %s" % self.filename ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Oops! Failed to parse %s" % self.filename)?

lancersky commented 4 years ago

It should be not compatible with python3.

theBASTI0N commented 4 years ago

Thanks for the help.

I am running Fedora 31 which has made python3 the default, to get it to work i needed to run: python2 gl_image -p mifi -e "openssh-sftp-server nano htop"