I
I
Ivan Yakushenko2019-04-27 20:53:23
Python
Ivan Yakushenko, 2019-04-27 20:53:23

Why is the photo not being sent in the message?

image_source = 'L6qlPoJdHG4.jpeg'
VkUpload.photo_messages(image_source)

Mistake:
TypeError: photo_messages() missing 1 required positional argument: 'photos'

In the documentation for vk_api:
photo_messages(photos)
Load images into messages
Parameters: photos (str or list) – path to image(s) or file-like object(s)

What's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-04-27
@kshnkvn

Do you create an instance of the VkUpload class at all? This is not a static method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question