Update
Upon further testing, I was able to run cc.launchTests() and cc.launchCloudCompareGUI() with no issue. I then tried to load my data files (.las file format) using cc.loadPointCloud(), but it still did not work correctly and returned none. Thinking it could be a pathing issue, I then tried to load the example datasets created from the tests.
cloud = cc.loadPointCloud('.../CloudComPY/Data/cloudCropX.xyz')
cloud2 = cc.loadPointCloud('.../CloudComPY/Data/cloud.las')
print(type(cloud))
print(type(cloud2))
<class '_cloudComPy.ccPointCloud'>
<class 'NoneType'>
cc.loadPointCloud() has no problem loading the example data crated from the tests when it is a .xyz file format. But it is unable to load the .las example file that was created. Again, there appears to be some inconsistency here as I was able to load .las files using this function the other day, but I have no way of troubleshooting why/when it fails.
Edit: After doing more tests, the following file formats do not load with cc.loadPointCloud() - .las .laz .pcd .ptx
Original post
Hi,
I am using pixi (https://pixi.prefix.dev/latest/) to build a Python environment that can run CloudComPy on a Windows 11 machine. I have CloudCompare v2.14beta installed on my computer, and am using the latest binaries (CloudComPy312_20260610). I am running into an issue where on some occasions, CloudComPy does not appear to be working. For instance, I will try to run cc.loadPointCloud() and the function runs with no errors, but doesn't actually load the file and returns nothing. More frustrating is that I have not found a reliable way to troubleshoot why this happens - the test script I was building yesterday was functioning fine, but today nothing is working. I'm not sure if this is a problem with my installation or setup, but if there are any thoughts/suggestions on how to troubleshoot that would great.
Here are some simple diagnostics I can show:
Running envCloudComPy shows no issues:
(Python:dev) ...\CloudComPy312>envCloudComPy.bat
Checking environment, Python test: import cloudComPy
...\CloudComPy312\CloudCompare\cloudComPy
...\CloudComPy312\CloudCompare
...\CloudComPy312\CloudCompare\plugins
Environment OK!
Importing cc in python does return the following error which seems to be related to no QCoreApplication instance being started. I think this could be related to my issue, but the same error also appears on import when it is working normally, so I'm not sure.
import cloudComPy as cc
QFileSystemWatcher: Removable drive notification will not work if there is no QCoreApplication instance.
...\CloudComPy312\CloudCompare\cloudComPy
...\CloudComPy312\CloudCompare
...\CloudComPy312\CloudCompare\plugins
cc.launchDoc() works just fine, so the issue seems to be related to actually running/instancing CloudCompare. I'm also attaching my pyproject.toml file, so in theory someone should be able to replicate this exact environment/build.
[project]
dependencies = ["numpy-groupies>=0.11.3,<0.12", "numpy-quaternion>=2024.0.13,<2025", "lxml-html-clean>=0.4.5,<0.5"]
name = "Python"
requires-python = ">= 3.11"
version = "0.1.0"
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = [{platform = "win-64", cuda = "13.0"}]
[tool.pixi.pypi-dependencies]
python = { path = ".", editable = true }
[tool.pixi.tasks]
[tool.pixi.dependencies]
pytorch-gpu = ">=2.12.1,<3"
numpy = "1.26.*"
scikit-image = "0.22.0.*"
scikit-learn = ">=1.9.0,<2"
circle-fit = ">=0.1.3,<0.2"
timm = ">=1.0.27,<2"
numpy-indexed = ">=0.3.7,<0.4"
matplotlib = ">=3.11.0,<4"
cmake = ">=4.3.4,<5"
requests = ">=2.34.2,<3"
psutil = ">=7.2.2,<8"
[tool.pixi.feature.dev.dependencies]
spyder = ">=6.1.5,<7"
[tool.pixi.environments]
default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
Update
Upon further testing, I was able to run cc.launchTests() and cc.launchCloudCompareGUI() with no issue. I then tried to load my data files (.las file format) using cc.loadPointCloud(), but it still did not work correctly and returned none. Thinking it could be a pathing issue, I then tried to load the example datasets created from the tests.
cc.loadPointCloud() has no problem loading the example data crated from the tests when it is a .xyz file format. But it is unable to load the .las example file that was created. Again, there appears to be some inconsistency here as I was able to load .las files using this function the other day, but I have no way of troubleshooting why/when it fails.
Edit: After doing more tests, the following file formats do not load with cc.loadPointCloud() - .las .laz .pcd .ptx
Original post
Hi,
I am using pixi (https://pixi.prefix.dev/latest/) to build a Python environment that can run CloudComPy on a Windows 11 machine. I have CloudCompare v2.14beta installed on my computer, and am using the latest binaries (CloudComPy312_20260610). I am running into an issue where on some occasions, CloudComPy does not appear to be working. For instance, I will try to run cc.loadPointCloud() and the function runs with no errors, but doesn't actually load the file and returns nothing. More frustrating is that I have not found a reliable way to troubleshoot why this happens - the test script I was building yesterday was functioning fine, but today nothing is working. I'm not sure if this is a problem with my installation or setup, but if there are any thoughts/suggestions on how to troubleshoot that would great.
Here are some simple diagnostics I can show:
Running envCloudComPy shows no issues:
Importing cc in python does return the following error which seems to be related to no QCoreApplication instance being started. I think this could be related to my issue, but the same error also appears on import when it is working normally, so I'm not sure.
cc.launchDoc() works just fine, so the issue seems to be related to actually running/instancing CloudCompare. I'm also attaching my pyproject.toml file, so in theory someone should be able to replicate this exact environment/build.