-
Notifications
You must be signed in to change notification settings - Fork 12
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
libsedml python bindings overwrite libsbml python functionality #21
Comments
Can't reproduce this right now, for me this works just fine. Allthough I'm not working on linux right now. I will try and find time on the weekend to look into this. But since it works for me i obviously need more information:
Here is my test session, does something like that work?
|
Hi Frank, libsbml installation is via cloning the the libsbml sourceforge repository
followed by exporting the pythonpath. libsedml via cloning the github repository followed by
and exporting pythonpath. |
Python version: I just installed in with pip in a clean virtualenv
and exactly the same issue there. Everything works fine with libsbml before importing libsedml. Never used libsedml in combination with libsbml before, only separetely, but than never had problems. After importing libsedml not even basic model things are working after importing libsedml (see test session below similar to yours). The
|
thank you ... the key idea behind the pip question is to have both libsbml and libsedml from pip. Both libraries now include all dependencies, and so there ought to be little chance of symbols clashing. For now as workaround ... can you just include libsedml first? would that not solve the issue for now? |
Yes.
is a workaround which solves my issues right now. On Thu, Feb 11, 2016 at 7:04 PM, Frank Bergmann [email protected]
Matthias König |
Hi Frank, this is still a major issue, because I am unable to control the import order if a project is not a simple 1 file script. If a module which imports libsbml is loaded before importing libsedml the libsbml python bindings break. This is a a problem for instance in unit tests, because I have no control over the order in which the test modules are loaded and executed. If unit tests of a module which only depends on libsbml are executed before a unit test which import libsedml than the order is wrong. Matthias |
I agree it needs to be sorted, but this is an issue of libSBML. It will be addressed once there is a version of libSBML that separates the xml parsing layer and math layer, but there is literally nothing i can do about at this point. |
I see.
This fixes my unit test issues for now, because I have only very few modules with libsedml imports. |
Still an issue in November 2019 :) with (pip installed) libsbml 5.18.0 and libsedml 0.4.3, on linux with python 3.7. Importing libsedml before libsbml also no option for me in a more involved project. The suggestion above to reload works if must be. On >=python3.4, use import importlib
importlib.reload(libsbml) |
Importing
libsedml
in python overwrites the SBMLDocument.getModel functionality inlibsbml
, so that the libsbml model cannot be accessed any more.See the attached example code (Ubuntu, x64, libsbml and libsedml build from latest commits with cmake).
Results in
I.e. after importing libsedml I cannot access the libsbml model from an SBMLDocument any more.
The text was updated successfully, but these errors were encountered: