mampersat / ElectricSlide

Count rides down the slide at Dyn or GeekDay 2016
0 stars 0 forks source link

crash on second picture #1

Closed mampersat closed 7 years ago

mampersat commented 7 years ago

scan a second new card and get


HEY, You're NEW!!!!
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/dist-packages/pigpio.py", line 966, in run
    cb.func(cb.gpio, TIMEOUT, tick)
  File "/home/pi/pi/ElectricSlide/pi/reader.py", line 71, in _cb
    self.callback(self.bits, self.num)
  File "electricslide.py", line 73, in callback
    slide.ride(value)
  File "electricslide.py", line 58, in ride
    self.new_user(user_id)
  File "electricslide.py", line 40, in new_user
    camera = picamera.PiCamera()
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 488, in __init__
    self.STEREO_MODES[stereo_mode], stereo_decimate)
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 620, in _init_camera
    prefix="Camera component couldn't be enabled")
  File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 191, in mmal_check
    raise PiCameraMMALError(status, prefix)
PiCameraMMALError: Camera component couldn't be enabled: Out of resources (other than memory)

^CTraceback (most recent call last):
  File "electricslide.py", line 79, in <module>
    time.sleep(300)
KeyboardInterrupt
'''
flynnguy commented 7 years ago

Do you have a camera and is it setup?

mampersat commented 7 years ago

Yes - I have a camera plugged in. It worked for the first badge. My wife (works @ 150dow) has a badge, and I scanned hers and caused the above error.

flynnguy commented 7 years ago

I added this bit: https://github.com/mampersat/ElectricSlide/blob/master/pi/electricslide.py#L44

Which might help? I only have one card though.

I also just committed: https://github.com/mampersat/ElectricSlide/blob/master/pi/main.py

Which adds the start of the lcars interface. I didn't get much of a chance to clean it up but it seems to work so far. Doesn't take a picture or anything yet but I was able to get a handler to fire.

flynnguy commented 7 years ago

Closing since I have multiple users working now.