marvel-snap-bot icon indicating copy to clipboard operation
marvel-snap-bot copied to clipboard

OpenCV Issue

Open KSteez11 opened this issue 2 years ago • 10 comments

Ill attach a screenshot with some errors ive received. Someone else had the same error as me, but the fix did not help me for some odd reason. Screenshot 2023-02-10 173404

KSteez11 avatar Feb 10 '23 23:02 KSteez11

Check that you have the numpy version numpy==1.21.0

AdriaGual avatar Feb 11 '23 09:02 AdriaGual

i resolved by

pip uninstall opencv-python-headless -y

pip install opencv-python --upgrade

terrycwc1124 avatar Feb 11 '23 17:02 terrycwc1124

$ python start.py Connection result: already connected to 127.0.0.1:5555


Picture: 0

  • Turn: -2 [get_mana] Time elapsed: 0:00:00.004660
  • Mana: 0 [get_my_hand_cards] Time elapsed: 0:00:02.695228 Hand_cards: elektra okoye squirrel_girl [get_fields] Time elapsed: 0:00:00.832506
  • Active fields: ['first_field: strange_academy', 'second_field: monster_island', 'third_field: next_2_turns'] [get_player_fields_cards] Time elapsed: 0:00:00.001983
  • Player field cards:

| |-|-| || |x|-| || |-|-| | | |-|-| || |-|-| || |-|-| |

Traceback (most recent call last): File "C:\Users\User\code\marvel-snap-bot\start.py", line 65, in play_info = info.get_info( File "C:\Users\User\code\marvel-snap-bot\info.py", line 41, in get_info cv2.waitKey(10) cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1333: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'

HolidayPhenom avatar Feb 11 '23 20:02 HolidayPhenom

pip install opencv-python==4.7.0.68 pip install opencv-python-headless==4.6.0.66

AdriaGual avatar Feb 11 '23 23:02 AdriaGual

Check that you have the numpy version numpy==1.21.0

Does it have to be the exact version? I have 1.24.2 and can't seem to downgrade

pip install opencv-python==4.7.0.68 pip install opencv-python-headless==4.6.0.66

These are correct

eimia-q avatar Feb 12 '23 05:02 eimia-q

Exact versions, always.

Just uninstalll the 1.24.2 and install the 1.21.0

AdriaGual avatar Feb 12 '23 10:02 AdriaGual

Exact versions, always.

Just uninstalll the 1.24.2 and install the 1.21.0

Thanks for the reply. I've finally gotten numpy on 1.21.0 and am still getting the same error. Have tried all fixes in this thread.

[get_fields] Time elapsed: 0:00:01.029457

  • Active fields: ['first_field: washington_dc', 'second_field: next_turn', 'third_field: next_2_turns'] [get_player_fields_cards] Time elapsed: 0:00:00.002736
  • Player field cards:

| |-|-| || |-|-| || |-|-| | | |-|-| || |-|-| || |-|-| |

Traceback (most recent call last): File "start.py", line 65, in play_info = info.get_info( File "C:\Users\Jake\marvel-snap-bot\info.py", line 41, in get_info cv2.waitKey(10) cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1333: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'

eimia-q avatar Feb 12 '23 12:02 eimia-q

FIXED WITH pip install opencv-contrib-python

eimia-q avatar Feb 12 '23 13:02 eimia-q

sirni@NIX MINGW64 /c/marvel-snap-bot (master) $ python start.py Traceback (most recent call last): File "C:\marvel-snap-bot\start.py", line 1, in from utils import android_connection, global_utils File "C:\marvel-snap-bot\utils\android_connection.py", line 4, in import config File "C:\marvel-snap-bot\config.py", line 1 adb_path = r"C:\Users\paper\marvel-snap-bot\platform-tools ^ SyntaxError: unterminated string literal (detected at line 1)

how to fix this error

nixtynine avatar Feb 17 '23 16:02 nixtynine

@nixtynine #74

paperc07 avatar Feb 17 '23 16:02 paperc07