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

Possible fix to add_interaction from hierarchy.py #19

Open
slegare2 opened this issue Sep 19, 2018 · 0 comments
Open

Possible fix to add_interaction from hierarchy.py #19

slegare2 opened this issue Sep 19, 2018 · 0 comments

Comments

@slegare2
Copy link
Collaborator

I always got the following error when trying to build a KAMI model with add_interaction():

 File "intact.py", line 821, in <module>
    kami_model.add_interaction(kami_interactions[0], anatomize=False)
  File "/home/slegare/ENS/venv_meta_update/lib/python3.6/site-packages/kami-1.2-py3.6.egg/kami/hierarchy.py", line 851, in add_interaction
    nugget, nugget_type = generate_from_interaction(interaction)
TypeError: generate_from_interaction() missing 1 required positional argument: 'interaction'

Looking at function generate_from_interaction(), it requires 2 arguments; hierarchy and interaction.
To fix the error, I added "self" to the arguments in line 851 of hierarchy.py:

nugget, nugget_type = generate_from_interaction(self, interaction)

It works, but is it weird to add "self" as argument? If this fix is ok I would push it.

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

No branches or pull requests

1 participant