Skip to content
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

"Could not find vizInterface when import attempted." Error with default settings on Linux. #732

Open
patrickwalton opened this issue Jun 21, 2024 · 4 comments

Comments

@patrickwalton
Copy link

Describe the bug
The build appears successful, but when I run python3 examples/scenarioBasicOrbit.py, I get the following warning:

Could not find vizInterface when import attempted. Be sure to build BSK with vizInterface support.

And with that no Vizard simulation is streamed or file created.

To reproduce

  • I removed previous basilisk and $HOME/.conan folders.
  • Re-clone basilisk: git clone [email protected]:AVSLab/basilisk.git.
  • Checkout the 2.3.0 release tag: git checkout v2.3.0.
  • Followed the Linux package management steps listed in the install on Linux instructions.
  • Created a virtual environment, entered it: python3 -m venv .venv and source .venv/bin/activate.
  • Installed wheel, conan<2.0.0, and cmake: pip3 install wheel 'conan<2.0.0' cmake.
  • Installed setuptools, because pkg_resources was not found: pip3 install setuptools.
  • Built basilisk: python3 conanfile.py.
  • Turn on simulation saving and streaming by uncommenting the corresponding lines in examples/scenarioBasicOrbit.py.
  • Run a scenario: python3 examples/scenarioBasicOrbit.py

Expected behavior
With vizInterface as the default, it should have been installed automatically.

Desktop (please complete the following information):

  • OS: Fedora
  • Version: 39
  • Python version: 3.12.3
  • Linux kernel: 6.9.4-100.fc39.x86_64

Additional context
The documentation said building with vizInterface support is the default and I see that in the beginning of the build output:

python -m conans.conan install . --build=missing -s build_type=Release -if dist3/conan -o opNav=False -o vizInterface=True -o buildProject=True

And vizInterface build appears to have been successful in the build output:

/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp: In member function ‘void VizInterface::ReadBSKMessages()’:
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:376:53: warning: comparison of integer expressions of different signedness: ‘Eigen::EigenBase<Eigen::Matrix<double, -1, 1> >::Index’ {aka ‘long int’} and ‘std::vector<MultiSphere*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  376 |                     if (msmChargeMsgBuffer.q.size() == scIt->msmInfo.msmList.size()) {
      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp: In member function ‘void VizInterface::WriteProtobuffer(uint64_t)’:
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:932:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  932 |             for (int i=0; i<scIt->oscOrbitLineColor.size(); i++){
      |                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/patrick/basilisk/src/simulation/vizard/vizInterface/vizInterface.cpp:937:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  937 |             for (int i=0; i<scIt->trueTrajectoryLineColor.size(); i++){
      |                           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
[100%] Linking CXX shared module Basilisk/simulation/_vizInterface.so
[100%] Built target vizInterface
@sassy-asjp
Copy link
Contributor

sassy-asjp commented Jun 24, 2024

You might be running into #525 #523 since you're removing $HOME/.conan every time.

@patrickwalton
Copy link
Author

patrickwalton commented Jul 1, 2024

As a workaround, I found that building with python3 conanfile.py --vizInterface=True fixed the problem. I believe this was a clean install (no prior .conan config).

This is undesirable behavior, since this flag should be running with the defaults for python3 conanfile.py and the script even confirms that this flag is set to true.

@patrickwalton
Copy link
Author

You might be running into #525 #523 since you're removing $HOME/.conan every time.

It's possible, but I only started deleting $HOME/.conan everytime after I started running into the issue.

@schaubh
Copy link
Contributor

schaubh commented Jul 30, 2024

That is curious @patrickwalton . I agree that python3 conanfile.py --vizInterface True should be the same as python conanfile.py. I don't have access to a Linux system at the moment. On macOS the vizInterface default is working as expected. I'm working on other build related changes right now, but will need to revisit this later on. Glad you found a work-around for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants