THE f2py command subprocess, of function "compile_api_f2py" in module "compilation.compil_tools", exits with an error, which is caused by an AssertionError at function "markoutercomma" in numpy module "f2py.crackfortran".
It is found that f2py-1.24.3 will work well.
Specific error infor is:
Traceback (most recent call last):
File "/home/model/scripts/compile_telemac.py", line 142, in <module>
main()
File "/home/model/scripts/compile_telemac.py", line 134, in main
compile_api_files(silent=not options.verbose,
File "/home/model/scripts/compilation/compil_tools.py", line 1001, in compile_api_files
compile_api_f2py('api', api_dir, source_api, skip_source, ld_flags,
File "/home/model/scripts/compilation/compil_tools.py", line 915, in compile_api_f2py
raise TelemacException(\
utils.exceptions.TelemacException: Error during first part of f2py for api 1
Traceback (most recent call last):
File "/usr/local/bin/f2py", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/f2py2e.py", line 734, in main
run_main(sys.argv[1:])
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/f2py2e.py", line 462, in run_main
postlist = callcrackfortran(files, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/f2py2e.py", line 363, in callcrackfortran
postlist = crackfortran.crackfortran(files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/crackfortran.py", line 3355, in crackfortran
readfortrancode(files, crackline)
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/crackfortran.py", line 552, in readfortrancode
dowithline(finalline)
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/crackfortran.py", line 858, in crackline
analyzeline(m, pat[1], line)
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/crackfortran.py", line 1300, in analyzeline
for e in markoutercomma(ll).split('@,@'):
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/numpy/f2py/crackfortran.py", line 895, in markoutercomma
assert not f, repr((f, line, l))
AssertionError: (1, ' pos_name = (', ' pos_name = (')