pageauc / speed-camera

A Unix, Windows, Raspberry Pi Object Speed Camera using python, opencv, video streaming, motion tracking. Includes a Standalone Web Server Interface, Image Search using opencv template match and a whiptail Admin Menu Interface Includes picam and webcam Plugins for motion track security camera configuration including rclone sync script. watch-app allows remotely controller camera configuration from a remote storage service name. Uses sqlite3 and gnuplot for reporting. Recently added openalpr license plate reader support.
Apache License 2.0
983 stars 172 forks source link

AttributeError: 'NoneType' object has no attribute 'shape' #48

Closed AbhisarAnand closed 3 years ago

AbhisarAnand commented 4 years ago

I downloaded the programs by using the curl method. And then I ran the speed-cam.py program by using the ./speed-cam.py. But the program gave me the error:AttributeError: 'NoneType' object has no attribute 'shape' Segmentation fault

I don't know how to solve this issue. I even reinstalled everything(including the os) on the raspberry pi. I still had the same error. It would be great if someone could help me.

I have attached a picture of the error I keep getting: AttributeError

pageauc commented 4 years ago

Looks like might be a problem with the pi-camera. What version of Raspbian are you using and what model of raspberry pi. Segmentation faults are usually due to some type of corruption either in OS/Memory/SD card/Hardware, Etc. Make sure your RPI power supply is correct for your RPI. RPI3 should have 2.5 amp supply.

Make sure the camera module is working correctly. Try re clamping down the ribbon cable at the RPI.
You could also try

sudo apt-get update
sudo apt-get upgrade
sudo halt

Then restart RPI by cycling power off and on. If that does not work try updating to latest rpi firmware

sudo rpi-update

reboot to install updated firmware.

If you have a webcam you could try that and change the config.py settings.

per above let me know model of RPI and OS version, eg buster, stretch, jessie, etc.

Regards