Python Forum
Problem with updating file to attach/pynput
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with updating file to attach/pynput
#7
No, the problem is the while True. You never recreate the file attachment, you never re-open the file, you never build a new email. You open the file once, when the script starts, and then never look at it again.

The easiest solution, would be to move the while True to be the first line of the function, so you rebuild the email each time you want to send it.
Reply


Messages In This Thread
RE: Problem with updating file to attach/pynput - by nilamo - Oct-27-2018, 09:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem with "from pynput" LFreitas 1 237 Mar-24-2024, 02:23 AM
Last Post: deanhystad
  Python openyxl not updating Excel file MrBean12 1 404 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Updating sharepoint excel file odd results cubangt 1 931 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Pynput - One content on screen, another in the variable Valjean 4 1,073 Sep-18-2023, 06:00 PM
Last Post: Valjean
  Pynput Library not Working with Windows jacknewport 1 2,421 Mar-26-2022, 07:09 PM
Last Post: snippsat
  Initializing, reading and updating a large JSON file medatib531 0 1,825 Mar-10-2022, 07:58 PM
Last Post: medatib531
  Updating a config file [solved] ebolisa 8 2,688 Nov-04-2021, 10:20 AM
Last Post: Gribouillis
  Problem updating value in MySQL database dangermaus33 1 1,678 Nov-24-2020, 08:32 PM
Last Post: dangermaus33
  Is it possible to attach to an open existing Browser? tommytx 7 3,121 Apr-27-2020, 12:40 AM
Last Post: tommytx
  Solve Pynput Problem when changing language? ppel123 0 2,309 Feb-19-2020, 03:38 PM
Last Post: ppel123

Forum Jump:

User Panel Messages

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