saimj7 / People-Counting-in-Real-Time

People Counting in Real-Time with an IP camera.
MIT License
528 stars 263 forks source link

Webcam something is wrong #74

Closed XiaShenyue closed 11 months ago

XiaShenyue commented 1 year ago
Traceback (most recent call last):
  File "C:\下載\People-Counting-in-Real-Time-master\people_counter.py", line 368, in <module>
    people_counter()
  File "C:\下載\People-Counting-in-Real-Time-master\people_counter.py", line 136, in people_counter
    frame = imutils.resize(frame, width=500)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\tien9\AppData\Local\Programs\Python\Python311\Lib\site-packages\imutils\convenience.py", line 69, in resize
    (h, w) = image.shape[:2]
             ^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'shape'

I've tried many methods and I've also tried asking ChatGPT but I found it's not reliable

I need help

saimj7 commented 11 months ago

Did you set "url": 0 in utils/config.json?

XiaShenyue commented 11 months ago

Did you set "url": 0 in utils/config.json?

Thanks for taking the time to reply.

I've fixed it, I don't know how I fixed it. But I successfully executed. thank you.