Skip to content

python linter on open3d package is not working as expected. #3802

Description

Describe the bug
A clear and concise description of what the bug is.

I don't know if this is a bug but I m trying to understand why the vscode python intelisense can't autocomplete with this package, I have seen the same exactly behavior when I m using the OpenCV with VsCode put I solved by adding this setting, inside the vscode settings.json

"python.linting.pylintArgs": [
    "--extension-pkg-whitelist=cv2"
],

with this, the vscode intelisense work as expected and I can navigate through the opencv api.
but I canot do the same with the Open3D, what is the difference from other puthon packages that open3D have been build.

Can someone check this?
I think the majority of the developers in this days use VsCode as the main code editor and is gonna be very helpful for the developers if they can navigate the open3d methods.

Thank you.

To Reproduce
Steps to reproduce the behavior:

  1. pip install open3d-python
  2. then make a file rgbd_redwood.py
  3. put this content
from open3d import (
    read_image, create_rgbd_image_from_color_and_depth, create_point_cloud_from_rgbd_image,
    PinholeCameraIntrinsic, PinholeCameraIntrinsicParameters, draw_geometries)
import matplotlib.pyplot as plt

    # openImgWithCV('../TestData/RGBD/color/00000.jpg')
if __name__ == "__main__":

    print("Read Redwood dataset")

    color_raw = read_image("../TestData/RGBD/color/00000.jpg")
    depth_raw = read_image("../TestData/RGBD/depth/00000.png")
    rgbd_image = create_rgbd_image_from_color_and_depth(color_raw, depth_raw);
    print(rgbd_image)

    # plt.subplot(1, 2, 1)
    # plt.title('Redwood grayscale image')
    # plt.imshow(rgbd_image.color)

    # plt.subplot(1, 2, 2)
    # plt.title('Redwood depth image')
    # plt.imshow(rgbd_image.depth)
    # plt.show()

    pcd = create_point_cloud_from_rgbd_image(rgbd_image, PinholeCameraIntrinsic(PinholeCameraIntrinsicParameters.PrimeSenseDefault))
    # Flip it, otherwise the pointcloud will be upside down
    pcd.transform([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]])
    draw_geometries([pcd])
    # print(draw_geometries([]))
    print(pcd)
  1. press **CTRL + click in some function from the open3d module
  2. this must navigate to the source code of the open3D, so you can understand what this function is doing.

Expected behavior
I expected to navigate to the open3D code after I clicl in some function so I can read the documentation as a result I will understand better my code.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Python 3.6.7 64-bit
  • vsCode
    • Version: 1.30.1 (user setup)
    • Commit: dea8705087adb1b5e5ae1d9123278e178656186a
    • Date: 2018-12-18T18:12:07.165Z
    • Electron: 2.0.12
    • Chrome: 61.0.3163.100
    • Node.js: 8.9.3
    • V8: 6.1.534.41
    • OS: Windows_NT x64 10.0.17134

Additional context
Add any other context about the problem here.

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Dec 25, 2018
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Dec 27, 2018
  3. karrtikr commented on Dec 31, 2018

    @karrtikr

    Hi @George35mk ,
    Can I know the exact setting file you used for open3d

    "python.linting.pylintArgs": [
        "--extension-pkg-whitelist=???"
    ],
    
  4. karrtikr commented on Dec 31, 2018

    @karrtikr

    Shouldn't you use extension-pkg-whitelist=open3d for open3d?

  5. karrtikr commented on Dec 31, 2018

    @karrtikr

    If you're doing the same thing with open3d and cv2, and it's not working for the former, it seems like either pylint doesn't support extension-pkg-whitelist=open3d as argument (meaning something is wrong with linting open3d), or something is up with open3d module.

    In either case, it does not seem to be the issue of the python extension. I would recommend you to open this issue in pylint.

  6. ghost removed on Dec 31, 2018
  7. removed their assignment
    on Dec 31, 2018
  8. locked as resolved and limited conversation to collaborators on Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions