Failed to initialize the latest version of CobraToolbox

1,249 views
Skip to first unread message

rxjhwlwz

unread,
Apr 11, 2018, 6:07:24 PM4/11/18
to COBRA Toolbox
Hi, 
I could use CobraToolbox in my own computer yesterday. 

Today, I use 'git clone' to download the latest version of CobraToolbox in a remote server.
When I initialize it in MATLAB, I got:


 > Checking if git is installed ...  Done.
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)...Usage: git submodule [--quiet] add [-ry> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] update [--init] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <re
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>..
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--] [<path>...]
Error using initCobraToolbox (line 192)
The submodules could not be initialized.

I download it on my own computer, I get: 
 
> Checking if git is installed ...  Done.
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)...Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/CnaCobraInterface'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/Smith-Decomposition'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/Volume-and-Sampling'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/gaimc'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/lusol'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/pdco'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/external/rdir'...
Cloning into 'F:/MATLAB2018a/toolbox/cobratoolbox/test/models'...
Submodule path 'external/CnaCobraInterface': checked out 'da27ffdc0c5cf3d2856ea2062f254b1f7a65655f'
Submodule path 'external/Smith-Decomposition': checked out 'b30ed3a03af163c8ea35e6a83bca7d6626c7d825'
Submodule path 'external/Volume-and-Sampling': checked out '1c7adfb46c2c01037e625db76ff00e73616441d4'
Submodule path 'external/gaimc': checked out '33416fc35dfa708cb623e728f410483fd30ddee9'
Submodule path 'external/lusol': checked out 'a494d1649c56cf809a53341311658495386b00b5'
Submodule path 'external/pdco': checked out '2411e2ae8d2d67a9efc7a0a9866c13ec1041579d'
Submodule path 'external/rdir': checked out '0bfa4a3b623bf3cdfa1e707c4932c47d1035c5f3'
Submodule path 'test/models': checked out '1aee0b015d82f6f07c7f5176e873297cf6a5fa3d'
fatal: Needed a single revision
Unable to find current revision in submodule path 'tutorials'
Error using initCobraToolbox (line 192)
The submodules could not be initialized.
 
What is the problem?  Could you help me?  Thank you!

Laurent Heirendt

unread,
Apr 12, 2018, 5:16:23 AM4/12/18
to COBRA Toolbox
Hi,

May you try running the following commands from git Bash:


$ cd
~
$ git clone https
://github.com/opencobra/cobratoolbox.git
$ cd cobratoolbox
$ git submodule update
--init


Then, run initCobraToolbox from MATLAB.

Please note that you are:

1. using Matlab R2018a (which is not yet supported). We recommend R2016b.
2. you are cloning the COBRA Toolbox to a system directory (not recommended(!), as git/MATLAB does not have write permissions)

Please let me know if that worked.

Best,

Laurent

rxjhwlwz

unread,
Apr 13, 2018, 6:03:58 PM4/13/18
to COBRA Toolbox
Hi Laurent,

I did what you suggested in the server. However, I still get the same error.

Laurent Heirendt

unread,
Apr 14, 2018, 6:34:56 AM4/14/18
to COBRA Toolbox

Hi rxjhwlwz,

May you post here the output of the commands that you ran on the server?

As already mentioned, please clone the cobratoolbox in a user directory.

Best,

Laurent

PS: I have a hard time pronouncing/reading your name.


shuyong

unread,
Apr 16, 2018, 1:42:54 PM4/16/18
to COBRA Toolbox
Hi Laurent,

Thank you for your reply and the help. 
The git version in the sever is old. After using new version of git instead, I can initialize the cobratoolbox now. 

Best regards,
Shuyong

Laurent Heirendt

unread,
Apr 17, 2018, 12:28:25 AM4/17/18
to COBRA Toolbox
Hi Shuyong,

Great to hear that.

Enjoy,

Laurent

Maziya Ibrahim

unread,
Sep 17, 2018, 7:55:40 AM9/17/18
to COBRA Toolbox
i am facing a similar problem, till two days ago cobratoolbox initialized properly.. but now i get the following error:

 > Initializing and updating submodules (this may take a while)...error: Your local changes to the following files would be overwritten by checkout:
    additionalTutorials/constrainingModels/tutorial_constrainingModels.m
    additionalTutorials/constrainingModels/tutorial_constrainingModels.mlx
Please commit your changes or stash them before you switch branches.
Aborting
Unable to checkout 'fcc3f03fe1e12861a774c1a73476718e6aad2875' in submodule path 'tutorials'
Error using initCobraToolbox (line 205)

The submodules could not be initialized.

----------------------------------------

Any help on this?!

Thomas Pfau

unread,
Sep 17, 2018, 8:43:49 AM9/17/18
to cobra-...@googlegroups.com

Dear Maziya,

This is likely due to changed files in the tutorials, which can easily happen, if you do a tutorial.
Since we do not want to simply overwrite your changes (which could e.g. be notes, or other things that you want to keep) we don't proceed with the update in this situation.

As the error message tells you, if you would force such a checkout, all your changes would be deleted and would not be recoverable. It even tells you which files were modified (tutorial_constrainingModels.mlx and .m).
If you want to discard all those changes and don't want to save them, you can go to the additionalTutorials/constrainingModels tutorial and type:

>!git stash

in Matlab which should delete all of these changes.
You could also make a copy of those two files outside the toolbox if you want to keep those modifications.

Be careful with using the command, as you remove all modifications from the respective submodule (if you are in a submodule folder), or from the toolbox if you are in a non submodule folder, and if you have other git controlled projects, make sure you don't call this in the respective folders.

Best

Thomas



On 2018-09-17 13:55, Maziya Ibrahim wrote:

Unsubscribe

It appears that you have subscribed to commercial messages from this sender. To stop receiving such messages from this sender, please unsubscribe

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit http://secure-web.cisco.com/19qkKxcxtfQeCwcRdseGmIM7b7-uhxfqG1BxBcZcSFv7E8Qj0YS9tebTg1P2eV694opVnAJSy4ZSG4I_AG54tawziDFEGBfr-kv_2bsoEQ2_zfnFl5WzT8bo9xRSsgroBvbAOkbfKcBGF2AD9hl-ssfaOJGibUjgpDD0D0TaWt4GJ3fVV6wlRc7tUFErxjdwNdO4ZBQTTGWj-x3UvV9-FY09EbGfwl-DvIk25Vsu60tjPAube_iwGfYzmJsUmvvzTx8Fq44DJUIO3sUh7ZqRji1-OC9U2PUJyEnk61cMTsOktcN3Mj9DEyx3uTRO8L0x5_Kd0DRU7Bn47iVOKVA4_0-Jbe_w66ganFkD3uDY7pLb-pFsBlp9qL5gBjUaO7C3uIotQybjyevxZ-VZmubujdA/l34%3Ahttps%3A%2F%2Fgroups.google.com%2Fd%2Foptoute.

-- 
Université du Luxembourg
Faculté des Sciences, de la Technologie et de la Communication
Campus Belval, Biotech II 115
6 avenue du Swing
L-4367 Belvaux
Tel: (+352) 46 66 44 5309
Email: thoma...@uni.lu

Maziya

unread,
Sep 17, 2018, 9:00:11 AM9/17/18
to COBRA Toolbox
Reply all
Reply to author
Forward
0 new messages