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

Exception AttributeError: "'VideoCamera' object has no attribute 'vs'" #20

Open
Devraj004 opened this issue Sep 24, 2018 · 3 comments
Open

Comments

@Devraj004
Copy link

Hi Friends,
I have installed the code successfully. But when running python main.py file getting attribute error.

Any help please ?

  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
  • Restarting with stat
    mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC
    mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x2378020 (ENOSPC)
    mmal: mmal_connection_enable: output port couldn't be enabled
    Traceback (most recent call last):
    File "main.py", line 11, in
    video_camera = VideoCamera(flip = True) # creates a camera object, flip vertically
    File "/home/pi/Smart-Security-Camera/Smart-Security-Camera/camera.py", line 9, in init
    self.vs = PiVideoStream().start()
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/imutils/video/pivideostream.py", line 10, in init
    self.camera = PiCamera()
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/picamera/camera.py", line 433, in init
    self._init_preview()
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/picamera/camera.py", line 513, in _init_preview
    self, self._camera.outputs[self.CAMERA_PREVIEW_PORT])
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/picamera/renderers.py", line 558, in init
    self.renderer.inputs[0].connect(source).enable()
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/picamera/mmalobj.py", line 2212, in enable
    prefix="Failed to enable connection")
    File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
    picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources
    Exception AttributeError: "'VideoCamera' object has no attribute 'vs'" in <bound method VideoCamera.del of <camera.VideoCamera object at 0x7069eef0>> ignored
@kumar4Vipul
Copy link

kumar4Vipul commented Aug 1, 2019

In main.py file
if name == "main":
app.run(host='0.0.0.0', port=8000, debug=False)
debug need to be set to False
https://raspberrypi.stackexchange.com/questions/51406/cannot-connect-to-picamera-when-using-it-with-flask

@donaca4555
Copy link

not sure if it's connected.. I've got the same error when tried running a flask picamera proccess with node execSync. running it with exec solved it in my case.

@hadi-source
Copy link

not sure if it's connected.. I've got the same error when tried running a flask picamera proccess with node execSync. running it with exec solved it in my case.

can you please elaborate it

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

4 participants