error on initCobraToolbox

121 views
Skip to first unread message

Marco Severgnini

unread,
Apr 19, 2019, 3:58:20 AM4/19/19
to COBRA Toolbox
Dear Support, I just installed COBRA toolbox on my server and I occurred in an error while running "initCobraToolbox" command.

After performing some of the checks, the command fails when trying to execute "getFilesInDir"

I had a look at Matlab code, but I wasn't able to understand what causes the fail

Here you can find what happened:

> Checking if git is installed ... Done (version: 1.8.3.).
 
> 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)... Done.
Error using cellstr (line 24)
S must be
2-D.

Error in cell/strcat (line 17)
 varargin
{i} = cellstr(varargin{i});

Error in getFilesInDir (line 143)
files
= strcat(absPath, filesep, files);

Error in initCobraToolbox (line 222)
 dirContent
= getFilesInDir('type','all');

The output of generateSystemConfigReport is reported below:

 > ---------------------------------- SYSTEM CONFIGURATION REPORT ----------------------------------


      _____   _____   _____   _____     _____    
|
     
/  ___| /  _  \ |  _  \ |  _  \   / ___ \    |   COnstraint-Based Reconstruction and Analysis
     
| |     | | | | | |_| | | |_| |  | |___| |   |   The COBRA Toolbox - 2019
     
| |     | | | | |  _  { |  _  /  |  ___  |   |
     
| |___  | |_| | | |_| | | | \ \  | |   | |   |   Documentation:
     
\_____| \_____/ |_____/ |_|  \_\ |_|   |_|   |   http://opencobra.github.io/cobratoolbox
                                                 
|

Warning: Function ismatrix has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict
.
> In path (line 109)
 
In addpath (line 88)
 
In initCobraToolbox (line 108)
 
In generateSystemConfigReport (line 72)
Warning: Function ismatrix has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict
.
> In path (line 109)
 
In addpath (line 88)
 
In initCobraToolbox (line 111)
 
In generateSystemConfigReport (line 72)
Warning: Function ismatrix has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict
.
> In path (line 109)
 
In addpath (line 88)
 
In initCobraToolbox (line 114)
 
In generateSystemConfigReport (line 72)
 
> Checking if git is installed ...  Done (version: 1.8.3.).
 
> 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)... Done.

----------------------------------------------------------------------------------------------------
MATLAB
Version: 9.2.0.538062 (R2017a)
MATLAB
License Number: 123456
Operating System: Linux 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB                                                
Version 9.2         (R2017a)
Simulink                                              Version 8.9         (R2017a)
Aerospace Blockset                                    Version 3.19        (R2017a)
Aerospace Toolbox                                     Version 2.19        (R2017a)
Antenna Toolbox                                       Version 2.2         (R2017a)
Audio System Toolbox                                  Version 1.2         (R2017a)
Automated Driving System Toolbox                      Version 1.0         (R2017a)
Bioinformatics Toolbox                                Version 4.8         (R2017a)
Communications System Toolbox                         Version 6.4         (R2017a)
Computer Vision System Toolbox                        Version 7.3         (R2017a)
Control System Toolbox                                Version 10.2        (R2017a)
Curve Fitting Toolbox                                 Version 3.5.5       (R2017a)
DO
Qualification Kit                                  Version 3.3         (R2017a)
DSP
System Toolbox                                    Version 9.4         (R2017a)
Database Toolbox                                      Version 7.1         (R2017a)
Datafeed Toolbox                                      Version 5.5         (R2017a)
Econometrics Toolbox                                  Version 4.0         (R2017a)
Embedded Coder                                        Version 6.12        (R2017a)
Filter Design HDL Coder                               Version 3.1.1       (R2017a)
Financial Instruments Toolbox                         Version 2.5         (R2017a)
Financial Toolbox                                     Version 5.9         (R2017a)
Fixed-Point Designer                                  Version 5.4         (R2017a)
Fuzzy Logic Toolbox                                   Version 2.2.25      (R2017a)
Global Optimization Toolbox                           Version 3.4.2       (R2017a)
HDL
Coder                                             Version 3.10        (R2017a)
HDL
Verifier                                          Version 5.2         (R2017a)
IEC
Certification Kit                                 Version 3.9         (R2017a)
Image Acquisition Toolbox                             Version 5.2         (R2017a)
Image Processing Toolbox                              Version 10.0        (R2017a)
Instrument Control Toolbox                            Version 3.11        (R2017a)
LTE
System Toolbox                                    Version 2.4         (R2017a)
MATLAB
Coder                                          Version 3.3         (R2017a)
MATLAB
Compiler                                       Version 6.4         (R2017a)
MATLAB
Compiler SDK                                   Version 6.3.1       (R2017a)
MATLAB
Distributed Computing Server                   Version 6.10        (R2017a)
MATLAB
Report Generator                               Version 5.2         (R2017a)
Mapping Toolbox                                       Version 4.5         (R2017a)
Model Predictive Control Toolbox                      Version 5.2.2       (R2017a)
Neural Network Toolbox                                Version 10.0        (R2017a)
Optimization Toolbox                                  Version 7.6         (R2017a)
Parallel Computing Toolbox                            Version 6.10        (R2017a)
Partial Differential Equation Toolbox                 Version 2.4         (R2017a)
Phased Array System Toolbox                           Version 3.4         (R2017a)
Polyspace Bug Finder                                  Version 2.3         (R2017a)
Polyspace Code Prover                                 Version 9.7         (R2017a)
Powertrain Blockset                                   Version 1.1         (R2017a)
RF
Blockset                                           Version 6.0         (R2017a)
RF
Blockset                                           Version 6.0         (R2017a)
RF
Toolbox                                            Version 3.2         (R2017a)
Risk Management Toolbox                               Version 1.1         (R2017a)
Robotics System Toolbox                               Version 1.4         (R2017a)
Robust Control Toolbox                                Version 6.3         (R2017a)
Signal Processing Toolbox                             Version 7.4         (R2017a)
SimBiology                                            Version 5.6         (R2017a)
SimEvents                                             Version 5.2         (R2017a)
Simscape                                              Version 4.2         (R2017a)
Simscape Driveline                                    Version 2.12        (R2017a)
Simscape Electronics                                  Version 2.11        (R2017a)
Simscape Fluids                                       Version 2.2         (R2017a)
Simscape Multibody                                    Version 5.0         (R2017a)
Simscape Power Systems                                Version 6.7         (R2017a)
Simulink 3D Animation                                 Version 7.7         (R2017a)
Simulink Code Inspector                               Version 3.0         (R2017a)
Simulink Coder                                        Version 8.12        (R2017a)
Simulink Control Design                               Version 4.5         (R2017a)
Simulink Design Optimization                          Version 3.2         (R2017a)
Simulink Design Verifier                              Version 3.3         (R2017a)
Simulink Report Generator                             Version 5.2         (R2017a)
Simulink Test                                         Version 2.2         (R2017a)
Simulink Verification and Validation                  Version 3.13        (R2017a)
Stateflow                                             Version 8.9         (R2017a)
Statistics and Machine Learning Toolbox               Version 11.1        (R2017a)
Symbolic Math Toolbox                                 Version 7.2         (R2017a)
System Identification Toolbox                         Version 9.6         (R2017a)
Trading Toolbox                                       Version 3.2         (R2017a)
Vision HDL Toolbox                                    Version 1.4         (R2017a)
WLAN
System Toolbox                                   Version 1.3         (R2017a)
Wavelet Toolbox                                       Version 4.18        (R2017a)

 
> Default shell       :        /bin/bash
 
> Version of shell    :        GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
 
> Architecture        :        GLNXA64
 
> MATLAB folder       :        /opt/MATLAB/R2017a
 
> COBRA Toolbox root  :        /opt/MATLAB/OtherToolbox/cobratoolbox
 
> git version         :        git version 1.8.3.1
 
> curl version        :        curl 7.29.0 (x86_64-redhat-linux-gnu)
 
> CBT_LP_SOLVER       :        
 
> CBT_MILP_SOLVER     :        
 
> CBT_QP_SOLVER       :        
 
> CBT_MIQP_SOLVER     :        
 
> CBT_NLP_SOLVER      :        
 
> GUROBI_PATH         :        
 
> ILOG_CPLEX_PATH     :        
 
> TOMLAB_PATH         :        
 
> MOSEK_PATH          :        

 
> ----------------------------------- END OF CONFIGURATION REPORT -----------------------------------

 
>  Please send the report located in
   
/opt/MATLAB/OtherToolbox/cobratoolbox/COBRAconfigReport.log

Thank you very much for your support,
All the best,

Marco Severgnini

Marco Severgnini

unread,
May 3, 2019, 3:37:41 AM5/3/19
to COBRA Toolbox
Dear all, after a couple of weeks I haven't received any feedback about my question yet.

Can anyone help me in understanding what happened?

Thank you very much

Marco

Ronan M.T. Fleming

unread,
May 7, 2019, 6:35:46 AM5/7/19
to COBRA Toolbox
Maybe 
Error in initCobraToolbox (line 222)
 dirContent 
= getFilesInDir('type','all');
fails if you dont have the right permissions set for the folder?

--

---
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 https://groups.google.com/d/optout.


--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
&
H2020 Project Coordinator
Systems Medicine of Mitochondrial Parkinson’s Disease
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile:  +353 873 413 072
Skype: ronan.fleming
----------------------------------------------------------------------------
(This message is confidential and may contain privileged information. It is intended for the named recipient only. If you receive it in error please notify me and permanently delete the original message and any copies.)

Marco Severgnini

unread,
May 7, 2019, 10:04:42 AM5/7/19
to COBRA Toolbox
Dear Ronan, I checked the path in which I installed COBRA toolbox and all the permissions were correctly set (i.e.: I can read the files and read/execute directories).

The problem, indeed seemed to be related to the fact that, when calling:

files = strcat(absPath, filesep, files); %line 143 in getFilesInDir

strcat command fails because it's attempting to concatenate absPath (length=1), filesep (length=1) and files (length=1707)

I succeded in hacking the code this way:

files=strcat(repmat({absPath},1,length(files)),repmat({filesep},1,length(files)),files);

Moreover, I also occurred into an error when the script checks for Matlab version using verLessThan in changeCobraSolver and I had to build my own way to check whether Matlab version is >8.6. Just for information, I substituted

% LINE 428
if verLessThan('matlab', '9') && ~verLessThan('matlab', '8.6')  % >2015b
  warning
('off', 'MATLAB:lang:badlyScopedReturnValue');  % take out warning message
end

with

matver=split(version,".");
matver
=str2double(strcat(char(matver(1)),'.',char(matver(2))));
if matver < 8.6
  warning
('off', 'MATLAB:lang:badlyScopedReturnValue');  % take out warning message
end

The same substitution was made in isCompatible script (line 242)

I don't know if this is a real bug or something related only to my Matlba environment, but i would like to share my experience and how I succeeded (apparently) in overcoming the initialization issues.

Marco

Laurent Heirendt

unread,
May 13, 2019, 8:59:50 AM5/13/19
to COBRA Toolbox
Hi Marco,


Next time, feel free to contribute yourself: https://opencobra.github.io/cobratoolbox/latest/contributing.html

Best regards,

Laurent
Reply all
Reply to author
Forward
0 new messages