bchairez
Posts: 7
Joined: Wed Mar 25, 2020 4:34 am

openCV project

Wed Mar 25, 2020 4:42 am

Hi guys, so I'm working on a project for school and I am in desperate need of help because I am pretty new to python and using the Raspberry pi. I am entering this command 'sudo python capture-positives.py' and get back these messages:

Code: Select all

sudo python capture-positives.py
Traceback (most recent call last):
  File "capture-positives.py", line 14, in <module>
    import hardware
  File "/home/pi/pi-facerec-box-master/hardware.py", line 8, in <module>
    import RPIO
  File "/home/pi/pi-facerec-box-master/RPIO/__init__.py", line 116, in <module>
    from RPIO._RPIO import Interruptor
  File "/home/pi/pi-facerec-box-master/RPIO/_RPIO.py", line 64, in <module>[/i][/i]
    class Interruptor:
  File "/home/pi/pi-facerec-box-master/RPIO/_RPIO.py", line 113, in Interruptor
    pull_up_down=_GPIO.PUD_OFF, threaded_callback=False,
AttributeError: 'module' object has no attribute 'PUD_OFF'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/pi/pi-facerec-box-master/RPIO/_RPIO.py", line 58, in exit_handler
    RPIO.stop_waiting_for_interrupts()
AttributeError: 'NoneType' object has no attribute 'stop_waiting_for_interrupts'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/pi/pi-facerec-box-master/RPIO/_RPIO.py", line 58, in exit_handler
    RPIO.stop_waiting_for_interrupts()
AttributeError: 'NoneType' object has no attribute 'stop_waiting_for_interrupts'
can someone please help, thank you!

User avatar
DougieLawson
Posts: 37763
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: openCV project

Wed Mar 25, 2020 1:39 pm

What's "capture-positives.py"? Where did that come from? Who wrote it? Is it a python2 program or a python3 one? Why do you think it needs to run with sudo? Hint: it doesn't.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bchairez
Posts: 7
Joined: Wed Mar 25, 2020 4:34 am

Re: openCV project

Wed Mar 25, 2020 5:22 pm

DougieLawson wrote:
Wed Mar 25, 2020 1:39 pm
What's "capture-positives.py"? Where did that come from? Who wrote it? Is it a python2 program or a python3 one? Why do you think it needs to run with sudo? Hint: it doesn't.
it came with the project, I downloaded it from 'https://learn.adafruit.com/raspberry-pi ... x/software'. It's an older project so I had to download opencv version 4 while they used 2, and I believe its written in python 2.

bchairez
Posts: 7
Joined: Wed Mar 25, 2020 4:34 am

Re: openCV project

Wed Mar 25, 2020 5:24 pm

bchairez wrote:
Wed Mar 25, 2020 5:22 pm
DougieLawson wrote:
Wed Mar 25, 2020 1:39 pm
What's "capture-positives.py"? Where did that come from? Who wrote it? Is it a python2 program or a python3 one? Why do you think it needs to run with sudo? Hint: it doesn't.
it came with the project, I downloaded it from 'https://learn.adafruit.com/raspberry-pi ... x/software'. It's an older project so I had to download opencv version 4 while they used 2, and I believe its written in python 2.
https://learn.adafruit.com/raspberry-pi ... x/software is the correct link

User avatar
DougieLawson
Posts: 37763
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: openCV project

Wed Mar 25, 2020 11:07 pm

Have you read that BIG RED NOTICE on the first page at https://learn.adafruit.com/raspberry-pi ... x/software
https://learn.adafruit.com/raspberry-pi-face-recognition-treasure-box/software wrote:Note this project was created in 2013 and the Raspberry Pi operating system has since
been updated to not be compatible with the RPIO library mentioned below. Use an older
version of Raspbian like a wheezy release from 2013 from:
http://downloads.raspberrypi.org/raspbian/images/
You are wasting your time trying to get that stuff to run on a modern Raspberry Pi with Raspbian Buster.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

bchairez
Posts: 7
Joined: Wed Mar 25, 2020 4:34 am

Re: openCV project

Fri Mar 27, 2020 2:02 am

DougieLawson wrote:
Wed Mar 25, 2020 11:07 pm
Have you read that BIG RED NOTICE on the first page at https://learn.adafruit.com/raspberry-pi ... x/software
https://learn.adafruit.com/raspberry-pi-face-recognition-treasure-box/software wrote:Note this project was created in 2013 and the Raspberry Pi operating system has since
been updated to not be compatible with the RPIO library mentioned below. Use an older
version of Raspbian like a wheezy release from 2013 from:
http://downloads.raspberrypi.org/raspbian/images/
You are wasting your time trying to get that stuff to run on a modern Raspberry Pi with Raspbian Buster.
Yes, I read that which is why i downloaded opencv4 instead.

Return to “Python”