-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
pyrealsense2 has no attribute 'context' #11671
Comments
Hi @shivangi-futuristicbots There are only a couple of past cases of this error that have been reported on this librealsense support site. A suggested solution by RealSense users in both cases was to change 'import pyrealsense2 as rs' to: import pyrealsense2.pyrealsense2 as rs |
i am getting this error after suggested changes you given:
|
Can you confirm please that you have an import pyrealsense2 as rs instruction placed before your ctx instruction?
#1735 (comment) has a Python example of using these lines for two RealSense cameras. If your project only uses one camera then it may not be necessary to use rs.context() (which is typically used to build a list of all attached cameras in a multiple camera application). The RealSense SDK's single-camera pyrealsense2 example programs at the link below do not use ctx. https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python/examples |
yes i import the statement : import pyrealsense2 as rs OK if i remove this lines of codes: and then i get this error:
i already check the pyrealsense2 package and it is already installed:
|
@futuristic2023 How did you solve this? |
i am getting this error the pyrealsense2 has no attribute context?
please help .. soon
The text was updated successfully, but these errors were encountered: