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

Read Point Cloud Function Type Error when specifying format argument. #763

Closed
lordlycastle opened this issue Jan 7, 2019 · 3 comments
Closed
Labels

Comments

@lordlycastle
Copy link

lordlycastle commented Jan 7, 2019

Describe the bug
The documentation and the source code of this library says that we can specify file format but I only get a TypeError on filename when I do so with the same argument.

To Reproduce

  1. Import library in Jupyter.
  2. Run the following code with a XYZ PC file: x = o3.read_point_cloud(filename='data\\cutView1.txt', format='xyz')
  3. Following error is produced for me:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-49-6a89bc1597c5> in <module>()
----> 1 x = o3.read_point_cloud(filename='data\\cutView1.txt', format='xyz')

TypeError: read_point_cloud(): incompatible function arguments. The following argument types are supported:
    1. (filename: str) -> open3d.win32.64b.open3d.PointCloud

Invoked with: kwargs: filename='data\\cutView1.txt', format='xyz'

Expected behavior
Load the file as it does when I don't specify the format after manually changing the extension of file to .xyz.

Screenshots
NA

Desktop (please complete the following information):

  • OS: Win10
  • Browser Chrome
  • Version 0.3.0
  • Py: 3.5.5

Additional context
Link to PC file: https://pastebin.com/Euv7Ha9J

@qianyizh
Copy link
Collaborator

qianyizh commented Jan 7, 2019

It is a new feature in Open3D 0.4. You need to upgrade Open3D. Here is what I got on my machine:

Python 3.6.7 |Anaconda custom (64-bit)| (default, Oct 23 2018, 19:16:44) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import open3d
>>> print(open3d.__version__)
0.4.0.0
>>> pcd = open3d.read_point_cloud("noisy_stanford_bunny_pc.txt", format="xyz")
>>> print(pcd)
PointCloud with 1660 points.

@lordlycastle
Copy link
Author

@qianyizh Thanks for the prompt reply. I'll check out the update. Are there any major bugs or breaking changes in the version that I should be aware of?

@qianyizh
Copy link
Collaborator

qianyizh commented Jan 8, 2019

Check out the latest release note :)
http://www.open3d.org/index.php/2018/10/26/open3d-0-3-0-is-ready-to-go-2/

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

No branches or pull requests

3 participants