Python Forum
Make entire script run again every 45 mo
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make entire script run again every 45 mo
#1
Newbie here with limited python knowledge.
I have a script that is dependent on 3 sensors to output gathered info. The original script is from the Petpot project
on Instructables. I can send/post it if necessary.
The script runs. After about 45 min to an hour, it seizes. I think if it were to start again every 45 min, that would no longer be the case.

There is a loop in the scripting:

# Main loop
running = True
clock = pygame.time.Clock()
At the end of the script he has placed:

pygame.display.update()
    clock.tick(30)

# Clean up video capture objects and quit
for cap in emoji_animations.values():
    cap.release()

try:
    pygame.quit()
except pygame.error as e:
    print(f"Pygame error while quitting: {e}")

quit()
I'm sure there is an easy answer to this. I just can't seem to find a solid solution. Thank you in advance.
Larz60+ write Jan-25-2024, 11:05 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Your code has been modified this time.
Please use BBCode tags on future posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to make a board with turtle, nothing happens when running script Quascia 3 682 Nov-01-2023, 03:11 PM
Last Post: deanhystad
  Make console show after script was built with Pyinstaller --NOCONSOLE? H84Gabor 0 1,214 May-05-2022, 12:32 PM
Last Post: H84Gabor
  Make my py script work only on 1 compter tomtom 14 3,891 Feb-20-2022, 06:19 PM
Last Post: DPaul
  Reiszing figure to occupy entire frame fishbackp 0 1,380 Jan-06-2022, 10:33 PM
Last Post: fishbackp
  How to get OpenCV to display entire camera frame? George713 1 3,271 Aug-12-2021, 02:45 AM
Last Post: Pedroski55
  How to apply a class method to an entire dataframe column tirtha9 1 5,154 Jan-03-2021, 04:44 AM
Last Post: klllmmm
  2d Array adds last element to entire list waiteup 2 2,102 Nov-19-2020, 08:25 PM
Last Post: bowlofred
  encrypt entire project mattc 2 2,427 Jul-21-2020, 07:05 AM
Last Post: mattc
  Make the script read from any directory falahfakhri 2 2,183 Jun-15-2020, 02:18 PM
Last Post: falahfakhri
  Using OpenPyXL How To Read Entire Column Into Dictionary jo15765 1 2,690 Jun-08-2020, 04:10 AM
Last Post: buran

Forum Jump:

User Panel Messages

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