Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not sending image with sendwhats_image #109

Closed
illives opened this issue Aug 6, 2021 · 19 comments
Closed

Not sending image with sendwhats_image #109

illives opened this issue Aug 6, 2021 · 19 comments
Labels
bug Something isn't working Closed Issue or feature request has been resolved

Comments

@illives
Copy link

illives commented Aug 6, 2021

I am using python 3.8.7 version and pywhatkit==5.1.
When I try to send an image, only the text goes.

I am using windows 10.

pwk.sendwhats_image("+551197xxxxxxxxx", "D:\path\testewhatkit.jpg", "Here is the image", 10, True, 5)

@aaryanrr aaryanrr added the unconfirmed Not a confirmed bug label Aug 7, 2021
@aaryanrr
Copy link
Collaborator

aaryanrr commented Aug 7, 2021

Hey @illives , try to pass on the path like this "D:\\path\\image.jpg" as \ is a special character and you need to escape it. Also, try to clear your browser cache and login again.

@gaurav-gvd
Copy link

hello..
i get value error: "ValueError: conversion from RGB to RBG not supported" while sending image
the image in in jpg format

@aaryanrr
Copy link
Collaborator

aaryanrr commented Aug 7, 2021

Please upgrade your installation to the latest version.

@gaurav-gvd
Copy link

@aaryanrr thank you. issue solved.

@illives
Copy link
Author

illives commented Aug 10, 2021

Hey @illives , try to pass on the path like this "D:\\path\\image.jpg" as \ is a special character and you need to escape it. Also, try to clear your browser cache and login again.

unfortunately it didn't work.
With one image the test was successful, but when I placed another image only the text was sent.
And no errors were raised by python.

pwk.sendwhats_image("+551197xxxxxxx", "D:\\R_DELFOS_PREVISAO_MOBILE\\My_Pictures\\chart01.png", "Here is the image", 10, True, 5)

@aaryanrr
Copy link
Collaborator

Hey @illives , try to pass on the path like this "D:\\path\\image.jpg" as \ is a special character and you need to escape it. Also, try to clear your browser cache and login again.

unfortunately it didn't work.
With one image the test was successful, but when I placed another image only the text was sent.
And no errors were raised by python.

pwk.sendwhats_image("+551197xxxxxxx", "D:\\R_DELFOS_PREVISAO_MOBILE\\My_Pictures\\chart01.png", "Here is the image", 10, True, 5)

Can you try it again by placing the image in the same directory as of the script. Also, Is this error with a particular format of image?

@kue5573
Copy link

kue5573 commented Sep 23, 2021

Hi Sir... i have also has the same issue.. I use latest pywhatkit==5.1. but no image upload and not able to send the message.. i already change wait time >30s .. but still no respond and I am using windows 10. Can anyone advise how to fix the bugs...

@aaryanrr
Copy link
Collaborator

Hey @kue5573, this bug has been fixed in version 5.2. It will be released by tomorrow!

@aaryanrr aaryanrr added bug Something isn't working and removed unconfirmed Not a confirmed bug labels Sep 23, 2021
@aaryanrr aaryanrr added this to To do in Next Version via automation Sep 23, 2021
@aaryanrr aaryanrr moved this from To do to Done in Next Version Sep 23, 2021
@kue5573
Copy link

kue5573 commented Sep 23, 2021

Thanks a lot.. I am really excited to use it.

@Costosmaya
Copy link

hi there, it says you were going to release a new version to fix this bug but where still in version 5.1, i'm having this issue, not sending the image just text.

@aaryanrr
Copy link
Collaborator

Hey @Costosmaya, we apologize for the delay in update. All the core maintainers are currently busy with other stuff and there are a lot of changes that have to be finalized for the next update. Thanks for bearing with us.

@Costosmaya
Copy link

Hey @aaryanrr thanks for your reply. I understand, your library is the best so far for what i need to do, but this has given me so frustration when not sending the img, i realized it "fixes" when clearing browsers cache, so i just setted up an automatic batch file to clear the browser's cache. Btw, is there any upcoming feature to send attachments, like pdf files?

@aaryanrr
Copy link
Collaborator

Hey @aaryanrr thanks for your reply. I understand, your library is the best so far for what i need to do, but this has given me so frustration when not sending the img, i realized it "fixes" when clearing browsers cache, so i just setted up an automatic batch file to clear the browser's cache. Btw, is there any upcoming feature to send attachments, like pdf files?

So far we haven't found any way to send attachments like word files or pdfs but we are looking into it.

@aaryanrr
Copy link
Collaborator

Hey @illives , this bug has been fixed in #123. The update will be released today. Thank you!

@aaryanrr aaryanrr added the Closed Issue or feature request has been resolved label Nov 13, 2021
@aaryanrr aaryanrr removed this from Done in Next Version Nov 13, 2021
@jamesbcn
Copy link

jamesbcn commented Feb 24, 2022

I am having the same problem.

I am using version 5.3

Python 3.10.1

No errors. There is, however, an error when I intentionally write the path incorrectly.

@infocus619
Copy link

import pywhatkit as pwk

pwk.sendwhats_image(phone_no="+917904*******", img_path="C:/User/MI/OneDrive/Desktop/thubel.png", caption="Example image sent!")
error:AttributeError: partially initialized module 'socket' has no attribute 'AF_INET' (most likely due to a circular import)

@SigireddyBalasai
Copy link
Contributor

this error will be resolved in the next release you can use asyncpyewhatkit in mean time

@Enemfu
Copy link

Enemfu commented Dec 30, 2022

Hi...I also spent quite some time trying to solve this same problem. In my case two details helped me.
I hope it helps you too.

1º I put the full path, exactly this way below:
r "C:\u003d\u003d\u003d\u003d\inves.png"

2º just below the line of whatsapp code I put the timesleep(5), like this:

pywhatkit.sendwhats_image("+3532498XXXX39" ,r "C:\Users\Cliente\ipynb\inves.png")
time.sleep(5)

@khogula2004
Copy link

Hello @Costosmaya. I have installed latest pywhatkit version 5.4 but it is showing an error that unable to access pywhatkit api right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Closed Issue or feature request has been resolved
Projects
None yet
Development

No branches or pull requests

10 participants