Skip to content

Connecting to Sentinel hub with a proxy #38

@cnette

Description

@cnette

I can not connect the plugin to the service due to a proxy. I try "default" proxy and "httpproxy" as settings.
image

It could be due to urllib to ping the website and could be resolve by QgsNetworkAcessManager like in the documentation to publish plugins :
Plugins should make use of QgsNetworkAccessManager instead of using urllib2/requests/etc... which often fail to use correct proxy settings.

2023-11-14T09:44:15 WARNING Traceback (most recent call last):
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\PROGRA1\QGIS321.0\apps\Python39\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée

         During handling of the above exception, another exception occurred:
         
         Traceback (most recent call last):
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen
          httplib_response = self._make_request(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request
          self._validate_conn(conn)
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn
          conn.connect()
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 309, in connect
          conn = self._new_conn()
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connection.py", line 171, in _new_conn
          raise NewConnectionError(
         urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée
         
         During handling of the above exception, another exception occurred:
         
         Traceback (most recent call last):
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\requests\adapters.py", line 439, in send
          resp = conn.urlopen(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen
          retries = retries.increment(
          File "C:\PROGRA~1\QGIS32~1.0\apps\Python39\lib\site-packages\urllib3\util\retry.py", line 446, in increment
          raise MaxRetryError(_pool, url, error or ResponseError(cause))
         urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='identity.dataspace.copernicus.eu', port=443): Max retries exceeded with url: /auth/realms/CDSE/protocol/openid-connect/token (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions