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

k4a_module did not found #14

Closed
abbott1234 opened this issue Feb 18, 2020 · 8 comments
Closed

k4a_module did not found #14

abbott1234 opened this issue Feb 18, 2020 · 8 comments

Comments

@abbott1234
Copy link

abbott1234 commented Feb 18, 2020

When I was running viewer.py
GOT AN ERROR :Traceback (most recent call last):
File "viewer.py", line 1, in
import pyk4a
File "D:\ProgramData\Anaconda3\envs\pose\lib\site-packages\pyk4a_init_.py", line 2, in
from .pyk4a import *
File "D:\ProgramData\Anaconda3\envs\pose\lib\site-packages\pyk4a\pyk4a.py", line 2, in
import k4a_module
ImportError: DLL load failed: cannot find the specified module

fristly, I think it is the SDK vision problem, so I was trying to find vision1.2 SDK. but when I was installed vision1.2 it did not worked either.
I guess it is the linking problem, but I did not know how to use it

@lpasselin
Copy link
Collaborator

lpasselin commented Feb 18, 2020

Could you make sure the required modules are available during the initial install?

See specific instructions for windows in the readme. Adapt with your own paths and versions.

@abbott1234
Copy link
Author

I have set those paths to my env :LINK="C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\lib\k4a.lib"
Link-short="C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\bin"
link1="C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\lib"
link2="C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release"
link3="C:\Program Files\Azure Kinect SDK v1.3.0\sdk\windows-desktop\amd64\release\lib\k4a.lib"
link4="C:\Program Files\Azure Kinect SDK v1.2.0\sdk\windows-desktop\amd64\release\lib\k4a.lib"
link5="C:\Program Files\Azure Kinect SDK v1.2.0\sdk\windows-desktop\amd64\release\lib"
link6="C:\Program Files\Azure Kinect SDK v1.2.0\sdk\windows-desktop\amd64\release\bin"

And I have tried with quotes or without quotes, did not work either.

@abbott1234
Copy link
Author

abbott1234 commented Feb 19, 2020

The last error is solved by accident, I just try import numpy first and then import pyk4a, it is worked then without change any path env.

But viewer.py get another error, shows below:
[2020-02-19 13:56:33.959] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\dynlib\dynlib_windows.c (120): dynlib_create(). Failed to load DLL depthengine_2_0 with error code: 126
[2020-02-19 13:56:33.959] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\deloader\deloader.c (70): load_depth_engine(). Failed to Load Depth Engine Plugin (depthengine). Depth functionality will not work
[2020-02-19 13:56:33.960] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\deloader\deloader.c (71): load_depth_engine(). Make sure the depth engine plugin is in your loaders path
[2020-02-19 13:56:33.960] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\deloader\deloader.c (178): deloader_transform_engine_create_and_initialize(). Failed to load depth engine plugin
[2020-02-19 13:56:33.960] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\tewrapper\tewrapper.c (61): transform_engine_start_helper(). Transform engine create and initialize failed with error code: 108.
[2020-02-19 13:56:33.961] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\tewrapper\tewrapper.c (68): teresult == K4A_DEPTH_ENGINE_RESULT_SUCCEEDED returned failure in transform_engine_start_helper()
[2020-02-19 13:56:33.961] [error] [t=2644] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\tewrapper\tewrapper.c (86): transform_engine_start_helper(tewrapper) returned failure in transform_engine_thread()
[2020-02-19 13:56:33.961] [error] [t=16168] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\tewrapper\tewrapper.c (313): tewrapper_create(). Transform Engine thread failed to start
[2020-02-19 13:56:33.964] [error] [t=16168] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\transformation\transformation.c (433): transformation_context->tewrapper != NULL returned failure in transformation_create()
Traceback (most recent call last):
File "viewer.py", line 10, in
k4a.connect()
File "D:\ProgramData\Anaconda3\envs\azure\lib\site-packages\pyk4a\pyk4a.py", line 37, in connect
self._start_cameras()
File "D:\ProgramData\Anaconda3\envs\azure\lib\site-packages\pyk4a\pyk4a.py", line 55, in _start_cameras
self._verify_error(res)
File "D:\ProgramData\Anaconda3\envs\azure\lib\site-packages\pyk4a\pyk4a.py", line 184, in _verify_error
raise K4AException()
pyk4a.pyk4a.K4AException

Azure Kinect Viewer v1.2.0 or Azure Kinect Viewer v1.3.0 both works well.
I am reading the source code in 'pyk4a.py', I cannot found how to "import k4a_module" in line2. There has no file named k4a_module.
And this module controls how to open sensor.

@lpasselin
Copy link
Collaborator

I am sorry, I am not used to windows paths.

It looks like it cannot find the kinect depthengine dll. Can you make sure it can be found?

@abbott1234
Copy link
Author

abbott1234 commented Feb 20, 2020

I have thought about this, but I did not understand how did python link to depthengine dll, either did k4a.dll. Can you tell me which file and which line link them?
I have checked k4a.dll and depthengine_2_0.dll are in the same path. If it is path problem, k4a cannot be found either.

@lpasselin
Copy link
Collaborator

lpasselin commented Feb 20, 2020 via email

@WestbrookZero
Copy link

@abbott1234 Have you solved it? how to solved it? I meet the same problem on win10.

@lpasselin
Copy link
Collaborator

@WestbrookZero did you find a solution to this problem?

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

3 participants