balena-labs-projects / balena-cam

Network Camera with Raspberry Pi and WebRTC. Tutorial:
https://balena.io/blog/build-a-raspberry-pi-based-network-camera/
MIT License
176 stars 78 forks source link

Doesn't run successfully when pushed to balena; syntax error #99

Closed mozz100 closed 2 years ago

mozz100 commented 2 years ago

From the current master branch, I cloned and then pushed to balena. Image built ok and has deployed to my device (raspi 4)

However the balena-cam container is failing to start, falling over with a syntax error. Seems to be complaining about type hinting in pyee. Has some dependency not been pinned and an external release rendered this code un-runnable?

Traceback (most recent call last):
    File "/usr/src/app/server.py", line 5, in <module>
      from aiortc import RTCPeerConnection, RTCSessionDescription, VideoStreamTrack, RTCIceServer, RTCConfiguration
    File "/usr/local/lib/python3.5/dist-packages/aiortc/__init__.py", line 2, in <module>
      from .mediastreams import (AudioStreamTrack,  # noqa
    File "/usr/local/lib/python3.5/dist-packages/aiortc/mediastreams.py", line 7, in <module>
      from pyee import EventEmitter
    File "/usr/local/lib/python3.5/dist-packages/pyee/__init__.py", line 34, in <module>
      from pyee.base import EventEmitter as EventEmitter
    File "/usr/local/lib/python3.5/dist-packages/pyee/base.py", line 43
      self._events: Dict[
                  ^
  SyntaxError: invalid syntax
zoobot commented 2 years ago

same issue for me.

mozz100 commented 2 years ago

@zoobot I found that pinning pyee (as in https://github.com/balenalabs/balena-cam/pull/101) allowed me to work around this and get started. Not sure if @balenalabs are still maintaining this code?

mozz100 commented 2 years ago

This should be fixed in v0.2.9; marking closed