Python Forum
Sending Whatsapp Message in the text file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sending Whatsapp Message in the text file
#3
But i get error like this

Error:
Traceback (most recent call last): File "C:\Users\sisya\PycharmProjects\Whatsapppython\main.py", line 9, in <module> with open("footer.txt") as f: FileNotFoundError: [Errno 2] No such file or directory: 'footer.txt'
(Jun-21-2022, 10:49 AM)snippsat Wrote: If pywhatkit don't take a file object you can do it like this.
import pywhatkit

with open("footer.txt") as f:
    pywhatkit.sendwhats_image("E9wnucCUpBpD1aizIUyLv6", "E:\\PythonFiles\\Music.jpg", f.read(), 10)
    pywhatkit.sendwhatmsg_to_group("E9wnucCUpBpD1aizIUyLv6", "Test", 13, 3, 15, True, 5)
Reply


Messages In This Thread
RE: Sending Whatsapp Message in the text file - by ebincharles869 - Jun-21-2022, 11:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending a text from Python sawtooth500 2 433 Apr-14-2024, 01:56 PM
Last Post: sawtooth500
  Eliminate entering QR - Whatsapp web automated by selenium akanowhere 1 3,227 Jan-21-2024, 01:12 PM
Last Post: owalahtole
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,287 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,901 Apr-13-2022, 06:02 AM
Last Post: Paqqno
  Converted Pipe Delimited text file to CSV file atomxkai 4 7,429 Feb-11-2022, 12:38 AM
Last Post: atomxkai
  Trying to parse and work with the WhatsApp export of chats cubangt 6 3,008 Dec-16-2021, 08:20 PM
Last Post: cubangt
  [split] How to convert the CSV text file into a txt file Pinto94 5 3,589 Dec-23-2020, 08:04 AM
Last Post: ndc85430
  Winning/Losing Message Error in Text based Game kdr87 2 3,144 Dec-14-2020, 12:25 AM
Last Post: bowlofred
  how to automate sending bulk emails from an excel file or a calc-file apollo 0 2,916 Dec-10-2020, 08:43 PM
Last Post: apollo
  Saving text file with a click: valueerror i/o operation on closed file vizier87 5 4,701 Nov-16-2020, 07:56 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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