-
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
pybackend2: get_xu-->"The property set specified does not exist"; set_pu-->HResult 0x8007001f: "A device attached to the system is not functioning." #8438
Comments
Hi @skaudrey Which version of Python are you using, please? |
py3.6.12 |
Could you describe your overall installation process for librealsense, Python and the Python wrapper to me, please? It sounds as though you are using a laptop or desktop PC and Python 3.6. If you are using a laptop / desktop PC and not a device with an Arm processor such as Raspberry Pi or Nvida Jetson then you should be able to install the wrapper using the pyrealsense2 pip package. This would mean that you could ignore the installation instructions about building the wrapper from source code. Below is the pip-based installation method that I have used on my own Windows computer:
https://www.liquidweb.com/kb/how-to-install-python-on-windows/
You can obtain the file by right-clicking on the link below and selecting the option for downloading a link. It might be called Save Link As, Save Target As or something similar. https://bootstrap.pypa.io/get-pip.py This link is sourced from the Liquid Web guide to installing pip on Windows, which was the guide that I followed when documenting my own installation procedure for setting up pip. https://www.liquidweb.com/kb/install-pip-windows/ Place the file in the root folder of your Python installation on Windows (e.g Python36 for Python 3.6 or Python37 for Python 3.7).
python get-pip.py
pip install pyrealsense2 This command should install the latest version of the pip pyrealsense2 file from the PyPi pyrealsense2 file download archive for the Python 3 version that you have got installed. |
Hi, here's what I did while installing on my laptop (win10 x64):
B.T.W., I also tried uninstall all (realsense SDK and pyrealsense2), then reinstall realsense SDK, |
I recall from a recent case that if Conda is being used then the PYTHONPATH variable used to direct the Python wrapper to where Python is installed on the computer may be different from the paths typically used with Python. |
Well, pip3 and add PYTHONPATH to system environments still don't work. |
I went back to the start of the case and re-read it to seek new insights. How I read it is that you installed the Python wrapper using pip install pyrealsense2 but the pybackend_example_1_general.py example script that you tried with it did not work. So you tried building the Python wrapper from source code instead. You then copy the compiled realsense2.pyd, pybackend2.pyd to Lib/site-packages. It seems as though this is the stage of the process where it changes from the recommended instructions and goes wrong. The Windows version of the wrapper's instructions for building from source code ask that the pyrealsense2.pyd file be coped to \Lib\site-packages but your method copies realsense2.pyd and pybackend2.pyd to that folder instead. This would suggest that your installation process should be to put pyrealsense2.pyd into the Lib/site-packages folder. In your BTW note, you then try copying realsense2.pyd and pybackend2.pyd into the Lib/site-packages folder. This too does not meet the recommendation of the instructions to install pyrealsense2.pyd into that folder (not pybackend2.pyd). I hope that the above information is helpful. |
Sorry, my bad for the typos. It's pyrealsense2.pyd, always. Here I list what I have under Lib/site-packages |
Thanks for the update. The filename and location of your pyrealsense.2 pyd file look okay. And you have already defined your PYTHONPATH variable. Which path to your Python Conda did you use for PYTHONPATH, please? If placing pyrealsense2.pyd into the Lib/site-packages folder is not working for you then you still have the alternate method available of placing files in the same folder as your Python test script by copying pyrealsense2.cp36-win_amd64.pyd and realsense2.dll to that folder. You can find pre-made x64 versions of these two files for the particular Windows librealsense SDK version that you are using by navigating to the SDK folder location below: C: > Program Files (x86) > Intel RealSense SDK 2.0 > bin > x64 |
I located a complete guide for doing a Python wrapper installation on Anaconda and Windows that a RealSense user created based on advice provided earlier in the same case by a RealSense team member and another RealSense user. As well as reading this guide, it is worth reading the case from the beginning too to get a full understanding of what is being discussed. |
Sorry, follow the guide completely, still no progress. |
There is limited information available about installing the Python wrapper on Windows and Conda, so I do apologize for the lack of progress. There is an alternative Windows / Conda installation guide for the Python wrapper at the link below that may provide some new insights. |
Hi @skaudrey Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Hi, I use D455 and try to run the example offered here.
I compile my pybackend2 according to the guides, but I install pyrealsense2 ( 2.42.0.2924) by pip, then after compilation, I copied the compiled pyrealsense2.pyd and pybackend2.pyd under /Lib/site-packages.
Then when I run the script to line 53
ae = dev.get_xu(xu, 0xB, 1) # get XU value. args: XU, control #, # of bytes
I get the error:
hr returned: HResult 0x80070492: "The property set specified does not exist on the object."
If I skip the XU controls part and go to PU controls, when it is executed to line 64
dev.set_pu(rs.option.gain, 32)
,I get the error:
hr returned: HResult 0x8007001f: "A device attached to the system is not functioning."
The text was updated successfully, but these errors were encountered: