Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exiting from a file
#3
@DeaD_EyE thanks for helping out. I'm new to this language so will take me a time to digest the changes you made Blush

The file is now exiting correctly once the loop ends but when the button is pressed, I get the error msg: TypeError: kill_mplayer() takes no arguments (1 given)

The line GPIO.add_event_detect(buttonpin, GPIO.RISING, callback=kill_mplayer, bouncetime=300) is not passing an argument so, I don't understand the error.
Reply


Messages In This Thread
Exiting from a file - by ebolisa - Nov-15-2018, 12:21 PM
RE: Exiting from a file - by DeaD_EyE - Nov-15-2018, 01:39 PM
RE: Exiting from a file - by ebolisa - Nov-15-2018, 03:57 PM
RE: Exiting from a file [Solved] - by ebolisa - Nov-15-2018, 06:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Return not exiting function?? rudihammad 3 7,509 Dec-01-2020, 07:11 PM
Last Post: bowlofred
  proc communicate not exiting on python subprocess timeout leoonardoo 0 4,356 Sep-13-2017, 09:54 AM
Last Post: leoonardoo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020