Ankit404butfound / PyWhatKit

Send WhatsApp message at certain time and many other things.
MIT License
1.37k stars 297 forks source link

CFURLGetFSRef was passed a URL which has no scheme (the URL will not work with other CFURL routines) #300

Open alfa0000 opened 1 year ago

alfa0000 commented 1 year ago

Description

I am writing a simple program to send JPG files via WhatsApp in Python. The program opens WhatsApp in the browser, writes the caption but doesn't send neither the caption nor the attachment/jpeg file. It produces the following error:

2023-08-20 20:27:09.339 osascript[4867:190025] CFURLGetFSRef was passed a URL which has no scheme (the URL will not work with other CFURL routines)

To Reproduce

This is the code:

import pywhatkit as pwk

phone = "+8xxxxxx420402"
img_path = "page0.jpg"
caption = "test"
pwk.sendwhats_image(phone, img_path, caption, 30)

Screenshots

If applicable, add Screenshots to help explain your Problem

Version Information

You can Check the PyWhatKit Version using

print(pywhatkit.__VERSION__)
alfa0000 commented 1 year ago

I found my error. I needed to provide the full path for the file "page0.jpg"