GithubHelp home page GithubHelp logo

PyList_New is nil about nimpy HOT 6 CLOSED

yglukhov avatar yglukhov commented on May 23, 2024
PyList_New is nil

from nimpy.

Comments (6)

andreaferretti avatar andreaferretti commented on May 23, 2024

I have tried adding this snippet in the body of nimArrToPy:

echo pyLib.Py_BuildValue.isNil
echo pyLib.PyTuple_New.isNil
echo pyLib.PyTuple_Size.isNil
echo pyLib.PyTuple_GetItem.isNil
echo pyLib.PyTuple_SetItem.isNil
echo pyLib.Py_None.isNil
echo pyLib.PyType_Ready.isNil
echo pyLib.PyType_GenericNew.isNil
echo pyLib.PyModule_AddObject.isNil
echo pyLib.PyList_New.isNil
echo pyLib.PyList_Size.isNil
echo pyLib.PyList_GetItem.isNil
echo pyLib.PyList_SetItem.isNil

and I get

false
true
true
true
true
true
true
true
true
true
true
true
true

so apparently Py_BuildValue is the only symbol loaded (among the ones I tested)

from nimpy.

yglukhov avatar yglukhov commented on May 23, 2024

Looks like memory corruption of some sort. load template would raise exception in case of error. If you don't mind debugging, I'd try break soon after the syms are loaded, and set watchpoint for them (e.g. on pyLib.PyTuple_New).

from nimpy.

andreaferretti avatar andreaferretti commented on May 23, 2024

I confirm that after loading, the symbols are indeed not nil. But later, they all become nil.

I don't mind debugging, but unfortunately I am not familiar with how to work with a debugger... :-(

from nimpy.

yglukhov avatar yglukhov commented on May 23, 2024

Ping me on gitter pls

from nimpy.

yglukhov avatar yglukhov commented on May 23, 2024

Fixed, but depends on nim-lang/Nim#7885

from nimpy.

andreaferretti avatar andreaferretti commented on May 23, 2024

Great, thank you! Nimpy is really improving fast!

from nimpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.