Can't run Arcade on machines that have Anaconda installed

1

I'm a TA in a Programming course. This week's challenge was to build a basic chess game. The teacher made a game.py library that would help them. The problem is, when using the LostGame class, which is defined as follows (and uses the Arcade library):

class LostGame(arcade.Window):

    def __init__(self):
        super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
        self.sprites_list = None
        self.background = None
        arcade.set_background_color(arcade.color.RED)
        self.moves = []
        self.doing = 0
        self.started = 0
        self.current_text = "Comienza el juego"

We will have the following error:

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    juego = game.LostGame()
  File "/Users/daniel/Documents/Doctorado/Ayudantías/IIC2115/L02/game.py", line 39, in __init__
    super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/arcade/application.py", line 53, in __init__
    resizable=resizable, config=config)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/window/__init__.py", line 643, in __init__
    self._create()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/arcade/monkey_patch_pyglet.py", line 81, in _create
    self.context.attach(self.canvas)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyglet/gl/cocoa.py", line 289, in attach
    self._nscontext.setView_(canvas.nsview)
AttributeError: 'NoneType' object has no attribute 'setView_'

We noticed that this error would happen in all the computers that have Anaconda installed. We think it may be because Anaconda's Python doesn't recognize the Arcade library. We have already ran the code on an independent version of Python 3.7, without success.

Thanks in advance for your help!

idmdvan

Posted 2019-03-26T18:03:36.427

Reputation: 11

I am also having this issue. I'm not sure what the problem is, but it only seems to happen for me with the latest version of arcade (2.0.1). You may be able to install an older version as a workaround. 2.0.0 worked for me! – Orez – 2019-03-31T03:22:00.240

No answers