libroadrunner error with python 3.8

20 views
Skip to first unread message

Lucia Nasti

unread,
Jun 3, 2021, 6:23:53 AM6/3/21
to tellurium-discuss
Hello everyone!
This week I tried to use the function .setFloatingSpeciesAmounts() of libroadrunner (using Python 3.8) and I have always the following error:

NotImplementedError: Wrong number or type of arguments for overloaded function 'ExecutableModel_setFloatingSpeciesAmounts'.

  Possible C/C++ prototypes are:

    rr::ExecutableModel::setFloatingSpeciesAmounts(size_t,double const *)

    rr::ExecutableModel::setFloatingSpeciesAmounts(size_t,int const *,int,double const *)

even if I tried on a very simple example, that I attach here: 

import roadrunner 

rr= roadrunner.RoadRunner("/Users/Lu/Downloads/chemotaxis.xml")

originalQuantities=rr.model.getFloatingSpeciesAmounts()

print (originalQuantities)

rr.model.setFloatingSpeciesAmounts([1],[1])


I tried to use also Python 3.6 (and also another laptop) but it works only with python 2.7.


Could you help me, please?


Thank you a lot, 


Lucia


Herbert M Sauro

unread,
Jun 3, 2021, 4:04:02 PM6/3/21
to Lucia Nasti, tellurium-discuss
It turns out the documentation is wrong, it looks like the method was changed but the docs were not updated. It should be:

rr.model.setFloatingSpeciesAmounts([3.4, 5.6])

where the order of the species changed is determined by the order from:

rr.getFloatingSpeciesIds()

The docs will be updated.

Herbert Sauro




--
You received this message because you are subscribed to the Google Groups "tellurium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tellurium-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tellurium-discuss/9e964978-e8a0-445d-8cd1-f9f5db3b2927n%40googlegroups.com.


--
Herbert Sauro, Professor
University of Washington, Bioengineering
Reply all
Reply to author
Forward
0 new messages