2021-07-15 14:01:44,494 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/telegram/ext/conversationhandler.py", line 626, in handle_update
new_state = handler.handle_update(update, dispatcher, check_result, context)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
File "/Users/alvarogoederivera/web/python_bot/handlers.py", line 64, in add_media
send_photo = upload('http://res.cloudinary.com/demo/image/upload/couple.jpg')
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/cloudinary/uploader.py", line 46, in upload
return call_cacheable_api("upload", params, file=file, **options)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/cloudinary/uploader.py", line 394, in call_cacheable_api
result = call_api(action, params, http_headers, return_error, unsigned, file, timeout, **options)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/cloudinary/uploader.py", line 459, in call_api
response = _http.request("POST", api_url, param_list, headers, **kw)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/urllib3/request.py", line 78, in request
return self.request_encode_body(
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/urllib3/request.py", line 155, in request_encode_body
body, content_type = encode_multipart_formdata(
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/urllib3/filepost.py", line 78, in encode_multipart_formdata
for field in iter_field_objects(fields):
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/urllib3/filepost.py", line 42, in iter_field_objects
yield RequestField.from_tuples(*field)
File "/Users/alvarogoederivera/web/python_bot/lib/python3.8/site-packages/urllib3/fields.py", line 181, in from_tuples
filename, data = value
ValueError: not enough values to unpack (expected 2, got 1)
Hi, this doesn't seem like the code i wrote in the demo, for this article, however this doesn't look like the code to upload an image to cloudinary looks like. You might want to check the docs or use the one i wrote on the product_info method in handlers.py from the tutorial.
Hi! I have problem when I try upload an image using Cloudinary, I don't know what happen. This is my code:
The console show:
Does anyone have any idea what is going on?
Hi, this doesn't seem like the code i wrote in the demo, for this article, however this doesn't look like the code to upload an image to cloudinary looks like. You might want to check the docs or use the one i wrote on the
product_info
method inhandlers.py
from the tutorial.I get the same problem when doing the demo, that's why I simplified it.
The console show the same error:
I know the error is
upload
because when I remove it the error does not appear.I see, do you add caption to the image when you test it though.?
Could you check my code and see if there is something I am doing wrong?
github.com/alvaaz/telegram_bot
I would really appreciate it
oh great!, thanks for making this easier I'll take a look