andrewda / frc-livescore

A Python package to determine the score of an FRC game from images
MIT License
29 stars 4 forks source link

Incompatibilities #18

Closed rjbell4 closed 6 years ago

rjbell4 commented 6 years ago

I'd like to use this implementation to process frames from a video, so that I can determine the start and stop of a match, and extract out the video for that match.

However, I'm having difficulties getting things running. When I first installed with pip, it uses Python 2.7, and after manually also installing pytesseract, I get the following error:

    from livescore import Livescore2018
  File "/usr/local/lib/python2.7/dist-packages/livescore/__init__.py", line 3, in <module>
    from .Livescore2017 import Livescore2017
  File "/usr/local/lib/python2.7/dist-packages/livescore/Livescore2017.py", line 11
    def __init__(self, **kwargs) -> object:
                                 ^
SyntaxError: invalid syntax

So I thought perhaps I should use Python 3. When I tried that (after installing with pip3), I get the following error:

    frc = Livescore2018()
  File "/usr/local/lib/python3.6/dist-packages/livescore/Livescore2018.py", line 13, in __init__
    super(Livescore2018, self).__init__(2018, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/livescore/LivescoreBase.py", line 96, in __init__
    self._detector = cv2.xfeatures2d.SURF_create()
AttributeError: module 'cv2' has no attribute 'xfeatures2d'

Can you help me get the right versions of the necessary dependencies? Thanks!

rjbell4 commented 6 years ago

Nevermind, I found the requirements.txt, and was able to get this to work with pip3 install -r requirements.txt. I also needed to point at the latest GitHub code, rather than what pip installed.