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

Numl functions not working with python bindings #48

Closed
matthiaskoenig opened this issue Jun 29, 2017 · 5 comments
Closed

Numl functions not working with python bindings #48

matthiaskoenig opened this issue Jun 29, 2017 · 5 comments

Comments

@matthiaskoenig
Copy link

Hi Frank,
trying to read the numl data with the libsedml python bindings does not work. Somehow the numl related functions are not callable via the python interface, despite them being visible (i.e. I can see the documention and the function via the IDE)
(installed via pip install python-libsedml, version 0.4.1, or via the wheel Kyle build from develop version)

When trying to call functions on the NumlDocument I get:

/home/mkoenig/envs/tellurium-py27/bin/python /home/mkoenig/git/tellurium/tellurium/oven/sedmldata/reading_numl.py
Traceback (most recent call last):
  File "/home/mkoenig/git/tellurium/tellurium/oven/sedmldata/reading_numl.py", line 85, in <module>
    df_numl = load_numl_data(SOURCE_NUML)
  File "/home/mkoenig/git/tellurium/tellurium/oven/sedmldata/reading_numl.py", line 63, in load_numl_data
    print(doc_numl.getNumResultComponents())
AttributeError: 'SwigPyObject' object has no attribute 'getNumResultComponents'
Version: 0.4.1
<Swig Object of type 'NUMLDocument_t *' at 0x7f41d6f06de0>

Example attached.
sedmldata.tar.gz

The best
Matthias

@fbergmann
Copy link
Owner

fbergmann commented Jun 29, 2017 via email

@matthiaskoenig
Copy link
Author

Hi Frank,

yes, it looks like the libnuml python bindings are not available from within the libsedml python bindings.
I just tried building libnuml with the python bindings and can now get access to the numl information via this way.
M

@fbergmann
Copy link
Owner

fbergmann commented Jun 29, 2017 via email

@matthiaskoenig
Copy link
Author

Posting the full solution here in case anybody needs it:
Install both libsedml and libnuml python packages which makes the numl functions available, i.e.

pip install python-libsedml
pip install python-libnuml

@fbergmann
Copy link
Owner

fbergmann commented Sep 19, 2017

this is the same issue as #21 , it will all be sorted at one point when the xml layer is properly extracted. Until then making sure the load order is correct (using reload in the worse case) is the only solution i have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants