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

OpenCV Issue #72

Open
KSteez11 opened this issue Feb 10, 2023 · 10 comments
Open

OpenCV Issue #72

KSteez11 opened this issue Feb 10, 2023 · 10 comments

Comments

@KSteez11
Copy link

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

@AdriaGual
Copy link
Owner

Check that you have the numpy version numpy==1.21.0

@terrycwc1124
Copy link

i resolved by

pip uninstall opencv-python-headless -y

pip install opencv-python --upgrade

@HolidayPhenom
Copy link

$ 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'

@AdriaGual
Copy link
Owner

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

@eimia-q
Copy link

eimia-q commented Feb 12, 2023

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

@AdriaGual
Copy link
Owner

Exact versions, always.

Just uninstalll the 1.24.2 and install the 1.21.0

@eimia-q
Copy link

eimia-q commented Feb 12, 2023

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
Copy link

eimia-q commented Feb 12, 2023

FIXED WITH pip install opencv-contrib-python

@nixtynine
Copy link

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

@paperc07
Copy link

@nixtynine #74

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

7 participants