API & KerkoApp - "ERROR in zotero: HTTPSConnectionPool(host='api.zotero.org', port=443): Max retries exceeded"

206 views
Skip to first unread message

Sylvain Bruand

unread,
Jul 30, 2021, 5:42:51 PM7/30/21
to zotero-dev
Hi,

I'm currently trying to connect a Zotero Librayry to a website using KerkoApp (https://github.com/whiskyechobravo/kerkoapp), and I receive an error message I'm not able to understand, due to my poor knowledge of APIs...

Maybe someone here could understand the reason ?
As explained on the Kerkoapp presnetation on Github, I've updated the .env file with my variables, as :
« SECRET_KEY=(secret key I've chosen)
KERKO_TITLE=Bibliographie Velay et Haute-Loire
KERKO_ZOTERO_API_KEY=(here, a key which was ok when I was connecting with the Zotpress plugin for Wordpress)
KERKO_ZOTERO_LIBRARY_ID=4371063 »

Here is the error message :

(venv) gsu...@ssh01.cluster030.gra.hosting.ovh.net (python/3.8/development) ~/www/kerkoapp $ flask kerko sync

[2021-07-27 15:11:08,268] INFO in index: Starting index sync.

[2021-07-27 15:11:08,269] INFO in zotero: Requesting all item types...

[2021-07-27 15:11:11,326] ERROR in zotero: HTTPSConnectionPool(host='api.zotero.org', port=443): Max retries exceeded with url: /itemTypes?locale=en-US (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fadee555280>: Failed to establish a new connection: [Errno 111] Connection refused'))

Traceback (most recent call last):

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn

conn = connection.create_connection(

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection

raise err

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen

httplib_response = self._make_request(

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request

self._validate_conn(conn)

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn

conn.connect()

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connection.py", line 353, in connect

conn = self._new_conn()

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn

raise NewConnectionError(

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fadee555280>: Failed to establish a new connection: [Errno 111] Connection refused


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send

resp = conn.urlopen(

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen

retries = retries.increment(

File "/home/gsukkts/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.zotero.org', port=443): Max retries exceeded with url: /itemTypes?locale=en-US (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fadee555280>: Failed to establish a new connection: [Errno 111] Connection refused'))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "/home/gsukkts/venv/lib/python3.8/site-packages/kerko/zotero.py", line 21, in retry_zotero

return wrapped(*args, **kwargs)

File "/home/gsukkts/venv/lib/python3.8/site-packages/kerko/zotero.py", line 65, in load_item_types

return zotero_credentials.item_types()

File "/home/gsukkts/venv/lib/python3.8/site-packages/pyzotero/zotero.py", line 150, in wrapped_f

retrieved = self._retrieve_data(query_string, params=params)

File "/home/gsukkts/venv/lib/python3.8/site-packages/pyzotero/zotero.py", line 432, in _retrieve_data

self.request = requests.get(

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/api.py", line 76, in get

return request('get', url, params=params, **kwargs)

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request

return session.request(method=method, url=url, **kwargs)

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request

resp = self.send(prep, **send_kwargs)

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send

r = adapter.send(request, **kwargs)

File "/home/gsukkts/venv/lib/python3.8/site-packages/requests/adapters.py", line 516, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.zotero.org', port=443): Max retries exceeded with url: /itemTypes?locale=en-US (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fadee555280>: Failed to establish a new connection: [Errno 111] Connection refused'))

[2021-07-27 15:11:11,328] WARNING in zotero: The Zotero API call has failed in load_item_types. New attempt in 120 seconds...


Thanks a lot if you have any clue...

Best regards,

Sylvain (France)


Dan Stillman

unread,
Aug 1, 2021, 3:05:25 PM8/1/21
to zoter...@googlegroups.com
On 7/30/21 2:29 PM, Sylvain Bruand wrote:
> requests.exceptions.ConnectionError:
> HTTPSConnectionPool(host='api.zotero.org', port=443): Max retries
> exceeded with url: /itemTypes?locale=en-US (Caused by
> NewConnectionError('<urllib3.connection.HTTPSConnection object at
> 0x7fadee555280>: Failed to establish a new connection: [Errno 111]
> Connection refused'))
>
> [2021-07-27 15:11:11,328] WARNING in zotero: The Zotero API call has
> failed in load_item_types. New attempt in 120 seconds...
>

That just looks like a network connection problem (e.g., with Docker or
whatever environment you're running this in), not anything related to
Zotero.

Sylvain Bruand

unread,
Aug 7, 2021, 3:18:47 PM8/7/21
to zotero-dev
Thanks for your answer, Dan ! It hels me, I'm going to look upon the network connection then :)

Sincerely yours,
Sylvain

Reply all
Reply to author
Forward
0 new messages