Coder Social home page Coder Social logo

Comments (3)

ofloveandhate avatar ofloveandhate commented on August 18, 2024

i am getting the same or a similar unhelpful error using python3 when i import if i add bases<BaseT> to a certain class in my library...

initialization of _pybertini raised unreported exception

literally all i add is a bases to my class_, and i cannot import my library any more. this is with boost & boost.python versions 1.66; and Xcode Version 8.0 (8A218a), with

clang version 4.0.0 (trunk 289544)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

my python3 line to compile your example is

g++ -std=c++11 -I/usr/local/include -I/Users/ofloveandhate/anaconda/include/python3.6m  -shared -o foo.so nullptr_error.cpp -L/Users/ofloveandhate/anaconda/lib -lpython3.6m -L/usr/local/lib -lboost_python3-mt

with boost and boost.python installed from homebrew, and some anaconda install on the path.

to check my sanity, i compiled your above test example, and get the same problem, 22 months later. pretty sure it is the same problem as i am experiencing.

if i compile my code with python2 installed at /usr/local/bin which resolves to version 2.7.13 installed from brew using this

g++ -std=c++11 -I/usr/local/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7  -shared -o foo.so nullptr_error.cpp -L/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib -lpython2.7 -L/usr/local/lib -lboost_python

i get the following much better error message:

RuntimeError: extension class wrapper for base class bertini::Observer<bertini::tracking::AMPTracker> has not been created yet

in fact, compiling your example using python2 yields this error:

TypeError: No to_python (by-value) converter found for C++ type: std::nullptr_t

why does python2 yield much better error reporting?
is there a way to make the python3 error message more helpful? what are the circumstances in which this particular error can be generated?

from python.

ofloveandhate avatar ofloveandhate commented on August 18, 2024

i again encountered this just now (feb 10 2018). i got

initialization of _pybertini raised unreported exception

upon import of my "successfully" built library. and the issue was that i had not yet exposed an enum. would have been clearly reported by python2, not with python3.

from python.

dfaure-kdab avatar dfaure-kdab commented on August 18, 2024

I think the lack of precise error reporting was fixed in #280.
But I'm not sure if the problem with nullptr was fixed.

from python.

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.