You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nullptr as default argument results in unreported exception during import #60
When importing the resulting module in Python I see the following error:
>>> import foo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: initialization of foo raised unreported exception
If I replace nullptr with NULL, then there is no error. This is with Boost 1.59 installed via MacPorts on the latest version of OS X with the latest version of Xcode.
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
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
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?
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.
Activity
ofloveandhate commentedon Jan 12, 2018
i am getting the same or a similar unhelpful error using python3 when i
importif i addbases<BaseT>to a certain class in my library...initialization of _pybertini raised unreported exceptionliterally all i add is a
basesto myclass_, and i cannotimportmy library any more. this is with boost & boost.python versions 1.66; and XcodeVersion 8.0 (8A218a), withmy python3 line to compile your example is
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
i get the following much better error message:
in fact, compiling your example using python2 yields this error:
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?
ofloveandhate commentedon Feb 11, 2018
i again encountered this just now (feb 10 2018). i got
upon
importof my "successfully" built library. and the issue was that i had not yet exposed anenum. would have been clearly reported by python2, not with python3.dfaure-kdab commentedon Mar 19, 2021
I think the lack of precise error reporting was fixed in #280.
But I'm not sure if the problem with nullptr was fixed.