Gesture-Controlled-Virtual-Mouse
Gesture-Controlled-Virtual-Mouse copied to clipboard
error when running Gesture_Controller.py
I encounter the following error when running Gesture_Controller.py:
File "C:\Users\yiyun.zy\anaconda3\envs\py385\lib\importlib_init_.py", line 127, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2\gapi_init.py", line 290, in
How can I solve it? Thank you so much
Please provide more information,
- Python version
- Complete error log
Please provide more information,
- Python version
- Complete error log
- 3.8.5
- Traceback (most recent call last):
File "Gesture_Controller.py", line 3, in
import cv2 File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2_init_.py", line 181, in bootstrap() File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2_init_.py", line 175, in bootstrap if _load_extra_py_code_for_module("cv2", submodule, DEBUG): File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2_init.py", line 28, in _load_extra_py_code_for_module py_module = importlib.import_module(module_name) File "C:\Users\yiyun.zy\anaconda3\envs\py385\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level) File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2\gapi_init.py", line 290, in cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
try this
pip install "opencv-python-headless<4.3"
reference: https://stackoverflow.com/questions/72545779/cv2-not-work-after-install-mediapipe-library/72625417
try this
pip install "opencv-python-headless<4.3"
reference: https://stackoverflow.com/questions/72545779/cv2-not-work-after-install-mediapipe-library/72625417
I then get "ImportError: DLL load failed while importing win32api: No module named win32api"
I tried uninstall and install, tried pip install pywin32==227, tried python pywin32_postinstall.py -install. But none works
I encounter the following error when running Gesture_Controller.py:
File "C:\Users\yiyun.zy\anaconda3\envs\py385\lib\importlib__init__.py", line 127, in import_module return bootstrap.gcd_import(name[level:], package, level) File "C:\Users\yiyun.zy\Desktop\xuelangyun\gesture_control\venv\lib\site-packages\cv2\gapi__init.py", line 290, in cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
How can I solve it? Thank you so much
I am facing the exact same issue, can you please help me out
hey ! facing the same issue here , did you get any resolution to it??
No, not yet, I am currently working on that project, maybe if I get any solution, I will let you know. If you find any solution, please let me know
On Wed, 23 Nov 2022, 22:28 Yusra Ansari, @.***> wrote:
hey ! facing the same issue here , did you get any resolution to it??
— Reply to this email directly, view it on GitHub https://github.com/xenon-19/Gesture-Controlled-Virtual-Mouse/issues/17#issuecomment-1325387334, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASTJE4J5IRGISC5LXO2GA6DWJZELPANCNFSM5ZBMKOBA . You are receiving this because you commented.Message ID: @.*** com>
Hello, same problem with the same configuration then tutorial installation : python Gesture_Controller.py
Traceback (most recent call last):
File "Gesture_Controller.py", line 3, in <module>
import cv2
File "C:\Users\tomle\anaconda3\envs\gest\lib\site-packages\cv2\__init__.py", line 181, in <module>
bootstrap()
File "C:\Users\tomle\anaconda3\envs\gest\lib\site-packages\cv2\__init__.py", line 175, in bootstrap
if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "C:\Users\tomle\anaconda3\envs\gest\lib\site-packages\cv2\__init__.py", line 28, in __load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "C:\Users\tomle\anaconda3\envs\gest\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\tomle\anaconda3\envs\gest\lib\site-packages\cv2\gapi\__init__.py", line 301, in <module>
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
I got the same error as you, I followed these steps and now I can run the project.
- For this error
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
I did this
pip uninstall opencv-python
pip uninstall opencv-contrib-python
pip uninstall opencv-contrib-python-headless
and then
pip3 install opencv-contrib-python==4.5.5.62
reference: https://stackoverflow.com/questions/72706073/attributeerror-partially-initialized-module-cv2-has-no-attribute-gapi-wip-gs
- When I executed after making the above changes, I got the following error.
that is solved by
pip install protobuf==3.20.*
reference: https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly
Finally when I run this, I got the correct output
python Gesture_Controller.py
I hope it Helps.
try this
pip install "opencv-python-headless<4.3"
reference: https://stackoverflow.com/questions/72545779/cv2-not-work-after-install-mediapipe-library/72625417
I then get "ImportError: DLL load failed while importing win32api: No module named win32api"
I tried uninstall and install, tried pip install pywin32==227, tried python pywin32_postinstall.py -install. But none works
Did you fix this issue? I guess you are working on mac os
@xenon-19 @Viral-Doshi @ankit-4129 @parth-12
I am getting this error:
Traceback (most recent call last): File "/Users/musavveer/spam/02_Grp_GestureAndVoiceControlledVirtualMouse/code/src/Gesture_Controller.py", line 3, in <module> import cv2 File "/Users/musavveer/opt/anaconda3/envs/gest/lib/python3.8/site-packages/cv2/__init__.py", line 181, in <module> bootstrap() File "/Users/musavveer/opt/anaconda3/envs/gest/lib/python3.8/site-packages/cv2/__init__.py", line 175, in bootstrap if __load_extra_py_code_for_module("cv2", submodule, DEBUG): File "/Users/musavveer/opt/anaconda3/envs/gest/lib/python3.8/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module py_module = importlib.import_module(module_name) File "/Users/musavveer/opt/anaconda3/envs/gest/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/musavveer/opt/anaconda3/envs/gest/lib/python3.8/site-packages/cv2/mat_wrapper/__init__.py", line 33, in <module> cv._registerMatType(Mat) AttributeError: partially initialized module 'cv2' has no attribute '_registerMatType' (most likely due to a circular import)
I got the same error as you, I followed these steps and now I can run the project.
- For this error
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
I did thispip uninstall opencv-python pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless and then pip3 install opencv-contrib-python==4.5.5.62
reference: https://stackoverflow.com/questions/72706073/attributeerror-partially-initialized-module-cv2-has-no-attribute-gapi-wip-gs
- When I executed after making the above changes, I got the following error.
that is solved by
pip install protobuf==3.20.*
reference: https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directlyFinally when I run this, I got the correct output
python Gesture_Controller.py
I hope it Helps.
HI can you help me fixing the issue
I got the same error as you, I followed these steps and now I can run the project.
- For this error
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)
I did thispip uninstall opencv-python pip uninstall opencv-contrib-python pip uninstall opencv-contrib-python-headless and then pip3 install opencv-contrib-python==4.5.5.62
reference: https://stackoverflow.com/questions/72706073/attributeerror-partially-initialized-module-cv2-has-no-attribute-gapi-wip-gs
- When I executed after making the above changes, I got the following error.
that is solved by
pip install protobuf==3.20.*
reference: https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directlyFinally when I run this, I got the correct output
python Gesture_Controller.py
I hope it Helps.
error is resolve but the not get the output
Hello,
I exactly did what u said uninstalled pip and also installed protobuf==3.20.* pip but,
the code is not showing output and it also not showing any errors.
what should i do now.
even commented and uncommented the last two lines.
Can you help me with this as soon as possible.
(gest) C:\Users\Admin\OneDrive\Desktop\Gesture-COntrolled-Virtual-Mouse\src>python Gesture_Controller.py
(gest) C:\Users\Admin\OneDrive\Desktop\Gesture-COntrolled-Virtual-Mouse\src>