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

pclpy.read() throws a laspy exception #93

Open
whizbuzzer opened this issue Jul 20, 2021 · 1 comment
Open

pclpy.read() throws a laspy exception #93

whizbuzzer opened this issue Jul 20, 2021 · 1 comment

Comments

@whizbuzzer
Copy link

I have been trying to read a .las file on a python code on visual studio.

Should I try to run "pclpy.read()", the following exception gets thrown:

Message=You are using laspy 2.0, which has several improvements over 1.x
but with several breaking changes.
To stay on laspy 1.x: pip install laspy<2.0.0

        In short:
          - To read a file do: las = laspy.read('somefile.laz')
          - To create a new LAS data do: las = laspy.create(point_format=2, file_version='1.2')
          - To write a file previously read or created: las.write('somepath.las')
        See the documentation for more information about the changes https://laspy.readthedocs.io/en/latest/

Source=C:\lib\QR_Recognition_Python\test_octree.py
StackTrace:
File "C:\lib\QR_Recognition_Python\test_octree.py", line 45, in test_voxel_centroid_api_rgba
pc = pclpy.read(test_data("street_thinned.las"), "PointXYZ")
File "C:\lib\QR_Recognition_Python\test_octree.py", line 52, in (Current frame)
test_voxel_centroid_api_rgba()

Does anyone know any fix to this?

@hypertag
Copy link

This fix worked for me:
conda install -c conda-forge laspy=1.7.0

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

2 participants