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

example with fortran to python callback function fails with as of f90wrap v0.2.13: "bad argument to internal function" #204

Open
jmp75 opened this issue Nov 17, 2023 · 1 comment

Comments

@jmp75
Copy link
Contributor

jmp75 commented Nov 17, 2023

I had set up an example for setting up a callback function (#93). This resulted in a an example under examples/callback_print_function_issue93 . I am trying to re-run this example with f90wrap v0.2.13 and if fails to work as expected.

---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
Cell In[9], line 1
----> 1 CBF.caller.test_write_msg()

File ~/src/f90wrap/examples/callback_print_function_issue93/CBF.py:53, in Caller.test_write_msg()
     43 @staticmethod
     44 def test_write_msg():
     45     """
     46     test_write_msg()
     47     
   (...)
     51     
     52     """
---> 53     _CBF.f90wrap_test_write_msg()

SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1669131725489/work/Objects/tupleobject.c:159: bad argument to internal function

It might be related to #195, but not at all sure this is a single bug.

@jmp75
Copy link
Contributor Author

jmp75 commented Nov 17, 2023

This is probably happening at this line 159 of tupleobject.c in cypthon 3.9

Also, I can reproduce this issue with f90wrap 0.2.5 on python 3.9. My example was contributed such that it would have worked with f90wrap 0.2.2 (not sure which version of cpython though)

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

1 participant