-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: arg(): could not convert default argument into a Python object when using BLF #789
Comments
Hi @Zweisteine96, if you installed BLF with the superbuild and enabled Python bindings, there's no need to install manif with pip since it's included in the superbuild. Keep in mind that the superbuild doesn't install toml, so if needed, manually install toml++. If you're not modifying BLF's source code, consider installing it via conda in a conda environment as outlined in the readme. |
I think this
Back in time I tried to enable the option of using toml++ when ccmake, but got the same results...
but the BLF is already in robotology-superbuild, can't I just it from there? |
Manif is compiled and installed by the superbuild if you installed from sources
Yes, indeed, you need it to install it manually from https://github.com/marzer/tomlplusplus if you decide to compile the superbuild from sources
If you don't need to modify blf and all the other packages in the superbuild, you can avoid compiling it and just install the package in a conda env with conda commands and avoiding sourcing the setup.sh of the superbuild from your bash |
so this means before I enable the using toml++ option in ccmake I need to manually install toml from the above link? |
Follow-up: I' ve cloned the toml++ repo and compiled it. Then when I tried to enable the "using toml++" option when compiling blf, even I've given the path where it can find the tomlPlusPlus.cmake file, it still reported not finding required cmake file. |
Can you report the exact error you are experiencing? Where and with which command did you installed tomlplusplus? |
Hi @traversaro, sure! So I first cloned the toml++ repo to my Then inside
Then after configure the following error occured:
|
Are you sure that |
You are right. I missed a folder
But still the following error when trying to import blf module occurred:
|
I think you also missed to report a few steps in #789 (comment) on how you configured and installed |
maybe these are the missing part?
|
It is a bit difficult to debug the problem you report. Can you try to reproduce it in a clean venv+robotology-superbuild, and if you are successful report the steps here. In this way, it is easier to everyone to reproduce you error and debug it. Ideally, if you could capture that in a Dockerfile, it would be even easier. Furthermore, do you have any specific requirement to compile the superbuild from source with apt dependencies, or you are just interested in the running Python code? If you just require to run Python code, as @GiulioRomualdi already suggested perhaps preparing a clean conda environment and installing the blf package there could be the easiest way forward. |
To be honest, I can't know which commands did you use to install tomlplusplus on your environment. If you do not remember how you reached the state you are in, I strongly suggest you to start from a clean slate, otherwise it is quite difficult to be able to correctly debug any problem. |
If you are not sure how to start from scratch, I can help you next week, just schedule a meeting on my calendar. |
That's exactly what I was about to ask. I'd love to do that! |
In the end thanks to @traversaro, the problem is solved by creating a clean conda env instead of mix-using multiple package managers. I think we can close this issue now. |
Feel free to close! |
Closing as the issue is tackled. |
Hi @traversaro @S-Dafarra @GiulioRomualdi ,
at very beginning when importing BLF python module, I had some other issues which are reported here: https://github.com/ami-iit/element_pi-learning-human-estimation/issues/36#issuecomment-1876906558, this morning I thought I finally fixed the problem, but then I found I can't use
TomlParametersHandler()
frombipedal_locomotion_framework.bindings.parameters_handler
. So I did some uninstall-cleaning-install things, then I found myself stuck in the following bug if I try to import the BLF module:I'm using a virtual environment with python version 3.8.10. Before importing BLF python module, I did following things:
robotology/src/manif
switch todevel
branch and update to the newest, then inrobotology/build/src/manif
I didcmake
+make install
.robotology/src/blf
switch tov0.17.0
, then inrobotology/build/src/blf
I didcmake
+make install
things.pip install git+https://github.com/artivis/manif@devel
.In the end I have
bipedal_locomotion_framework: 0.17.0
andmanifpy: 0.1.dev756
installed. I can importmanifpy
without any problem. I tried to find the reason of above mentioned issue with BLF importing, and only got this: patrikhuber/eos#256 and this: neumond/pybrood#4, which are most related to my case.Do you have any idea what could be the reason and how could I tackle it? Many thanks :)
The text was updated successfully, but these errors were encountered: