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

Error when using writeCbModel #2071

Closed
3 tasks done
RieCo432 opened this issue Nov 19, 2022 · 2 comments
Closed
3 tasks done

Error when using writeCbModel #2071

RieCo432 opened this issue Nov 19, 2022 · 2 comments

Comments

@RieCo432
Copy link

I've been working with the COBRA Toolbox for almost a year now. Today, the writeCbModel function stopped working. I've tried reading and then saving various models I have been using for months and every time I try to save it, I get the following error:

Error using matlab.internal.math.uniqueCellstrHelper
Cell array input must be a cell array of character vectors.

Error in cell/unique (line 86)
    [varargout{1:nlhs}] = matlab.internal.math.uniqueCellstrHelper(A,[false true false true false]);

Error in getModelSubSystems (line 31)
        subSystems = unique(model.subSystems);

Error in writeSBML (line 453)
modelSubSystems = getModelSubSystems(model);

Error in writeCbModel (line 226)
        outmodel = writeSBML(model, fileName, input.compSymbols, input.compNames);

Error in enhance_iBsu1103v3 (line 152)
    outmodel = writeCbModel(model, 'format', 'sbml', 'filename', [filename '.xml']);

I have tried calling writeCbModel with the bare minimum of parameters (i.e. the model and a char array as a filename), but no luck.

I've had a look at the commit history for the source files that are involved in this, but there hasn't been any commits in about 3 weeks.

I hereby confirm that I have:

  • Tried to solve the issue on my own
  • Retried to run my code with the latest version of The COBRA Toolbox
  • Checked that a similar issue has not already been opened
@RieCo432
Copy link
Author

Turns out my model.subSystems was filled with empty char arrays. It worked fine after fixing that. Still wondering how that's never been an issue before though.

@rmtfleming
Copy link
Member

rmtfleming commented Nov 21, 2022 via email

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

2 participants