Comments (3)
If you have an IDE, just google to find how to do it. For intance on Windows MSVC has the PTVSD plugin that allows you to start a python process and break into C++ code.
If you don't use an IDE, std::cout
is your best friend. It seems that you have a core dump, so you should be able to read it with gdb and investigate the root cause of the issue.
from pybind11_json.
UPDATE 1
I found where the error appears, but I don't have any solution yet.
Apparently, the C++ pugixml
library is behaving differently on C++ and Python environment.
Here is the part of my C++ code where I found the different std::cout
output:
// Select XML nodes in the path 'myPath' using pugixml library
const pugi::xpath_node_set x = _doc.select_nodes(myPath);
// Get the number of XML nodes in 'myPath'
size_t xSize = x.size();
// Print
std::cout << "xSize: " << xSize << std::endl;
Running in the C++ side:
xSize: 2000
Running in the Python side:
xSize: 0
Do you have any ideas?
from pybind11_json.
Sorry, I was passing the wrong argument in the Python function....
Please, forget it...
from pybind11_json.
Related Issues (20)
- C++ returning nlohmann::json to Python. Is it possible? HOT 2
- Error: nlohmann::json as input argument HOT 2
- Bind nlohmann::json::array_t is possible? HOT 10
- Allow automatic cast from nlohmann::json to py::object in return type of functions HOT 7
- bytes, bytearray, memoryview support
- set, frozenset support HOT 1
- Build fails with CMake version < 3.14
- Infinity mishandled in nl::json => py::object conversion
- pybind11_json with c++ class HOT 4
- Cannot include dependencies with add_directories
- Support for binary arrays HOT 3
- local variable 'obj' will be copied despite being returned by name HOT 1
- What about enumerations?
- No 'test' target when BUILD_TESTS=ON
- [question] Python + C++ full example?
- support for `nlohmann::ordered_json` in addition to `nlohmann::json` HOT 2
- CMake deprecation warning HOT 3
- Redundant Move in from_json
- support for other kind of python object or class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybind11_json.