1

Good morning, i am using tensorflow lite and i also wanted to use telepot. I also installed the Coral USB accelerator, but I don't think it depends on him, also because it is independent of whether or not to add --edgetpu to the end of the program start command. It works only if the transfer of messages or images I place it before this instruction: from tensorflow.lite.python.interpreter import Interpreter it's how telepot is incompatible with tflite. Obviously everything works without the telepot instruction What can I do? I'm using a raspberry pi 4 with s.o. Debian burst, Python 3.7 and Opencv 4.1

This is the error that gives me:

Traceback (most recent call last):
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
        cnx.do_handshake()
      File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
        self._raise_ssl_error(self._ssl, result)
      File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
        _raise_current_error()
      File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
        raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
        chunked=chunked,
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
        self._validate_conn(conn)
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
        conn.connect()
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
        ssl_context=context,
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
        return context.wrap_socket(sock, server_hostname=server_hostname)
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
        raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
      File "TFLite_detection_webcam_Prova1.py", line 137, in <module>
        spedisci()
      File "TFLite_detection_webcam_Prova1.py", line 33, in spedisci
        bot.sendPhoto(256868258, foto)
      File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 539, in sendPhoto
        return self._api_request_with_file('sendPhoto', _rectify(p), 'photo', photo)
      File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 499, in _api_request_with_file
        return self._api_request(method, _rectify(params), files, **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 491, in _api_request
        return api.request((self._token, method, params, files), **kwargs)
      File "/usr/local/lib/python3.7/dist-packages/telepot/api.py", line 154, in request
        r = fn(*args, **kwargs)  # `fn` must be thread-safe
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/request.py", line 171, in request_encode_body
        return self.urlopen(method, url, **extra_kw)
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/poolmanager.py", line 330, in urlopen
        response = conn.urlopen(method, u.request_uri, **kw)
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
        **response_kw
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
        method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
      File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
        raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool
(host='api.telegram.org', port=443): Max retries exceeded with url: /bot926377239:AAEl0gqMWzG0dMidkGNqcGr2wkeTLbgZn3g/sendPhoto (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
ChrisMM
  • 8,448
  • 13
  • 29
  • 48
Gianfranco
  • 11
  • 1

0 Answers0