Closed FDiot closed 4 years ago
Bitbucket user bugno commented on 2017-01-30 08:56
"python3 --version" returns Python 3.4.3
"cython --version" returns "Cython version 0.20.1post0"
Bitbucket user bugno commented on 2017-02-02 15:01
The explaination is here: http://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#caveats-when-using-a-python-string-in-a-c-context
As it said, the rules to detect such errors are only heuristics, so sometimes Cython will complain or not.
I fixed like this:
#!python
load_solvers(solverdir.encode('utf-8'))
Becomes:
#!python
tmp = solverdir.encode('utf-8')
load_solvers(tmp)
Bitbucket user BachirH changed
state
fromnew
toresolved
on 2017-02-28 13:43
Error compiling Cython file:
... return b2ms
def acoustic_solver_by_name(name, foldername): """Load an acoustic solver from its name.""" load_solvers(foldername.encode('utf-8')) ^
/home/triou/Tympan/dev/python/tympan/_business2solver.pyx:56:34: Obtaining 'char const *' from temporary Python value
Error compiling Cython file:
...
cy.locals(computation=tybusiness.Computation) def acoustic_solver_from_computation(computation, foldername): """Load an acoustic solver from a computation.""" load_solvers(foldername.encode('utf-8')) ^