chunned / databass

Databass is a music diary to track the releases you listen to and how you feel about them.
3 stars 0 forks source link

CAA SSL Error #81

Closed chunned closed 1 month ago

chunned commented 1 month ago
databass  | Item is a release and MBID is populated; attempting to fetch image from CoverArtArchive: e59021bd-1710-3
c13-9449-b78560039592                                                                                               
databass  | {'release': {'id': '953df7eb-3047-4897-b146-c1058060b9ba', 'title': 'Music for the Masses', 'status': 'O
fficial', 'quality': 'normal', 'packaging': 'Jewel Case', 'text-representation': {'language': 'eng', 'script': 'Latn
'}, 'date': '1987', 'country': 'CA', 'release-event-list': [{'date': '1987', 'area': {'id': '71bbafaa-e825-3e15-8ca9
-017dcad1748b', 'name': 'Canada', 'sort-name': 'Canada', 'iso-3166-1-code-list': ['CA']}}], 'release-event-count': 1
, 'barcode': '075992561426', 'cover-art-archive': {'artwork': 'true', 'count': '10', 'front': 'true', 'back': 'true'
}, 'medium-list': [{'position': '1', 'format': 'CD', 'track-list': [{'id': '27a2b413-c8dc-4b8d-a929-d957e6d44d67', '
position': '1', 'number': '1', 'length': '287960', 'recording': {'id': 'ebc10daf-6e7b-4a89-b481-6834ed98b5ce', 'titl
e': 'Never Let Me Down Again', 'length': '287960', 'disambiguation': 'album version'}, 'track_or_recording_length': 
'287960'}, {'id': '48e53d48-878e-4740-8bf9-f424cde18c44', 'position': '2', 'number': '2', 'length': '243000', 'recor
ding': {'id': '22d37a4e-9e6c-40f7-ac48-383b29aead0a', 'title': 'The Things You Said', 'length': '242773'}, 'track_or
_recording_length': '243000'}, {'id': '6ebe6b38-ea61-417a-88bc-0825e2daa242', 'position': '3', 'number': '3', 'lengt
h': '295000', 'recording': {'id': 'dfac3d5d-a114-4bbb-a8fd-0ebf08ac5741', 'title': 'Strangelove', 'length': '295000'
, 'disambiguation': 'album version'}, 'track_or_recording_length': '295000'}, {'id': '725e75fc-324d-4891-90e5-24187e
942db2', 'position': '4', 'number': '4', 'length': '289000', 'recording': {'id': '00f86791-490e-4fd6-a5aa-b8e2ebc5a5
bc', 'title': 'Sacred', 'length': '288000'}, 'track_or_recording_length': '289000'}, {'id': '7a40cd23-5ece-4118-9301
-bdb3fde8e99f', 'position': '5', 'number': '5', 'length': '258893', 'recording': {'id': '74f2ccbc-9dcb-4ffc-9fa7-4e9
99f24885b', 'title': 'Little 15', 'length': '257040'}, 'track_or_recording_length': '258893'}, {'id': 'bac47b62-0d50
-4102-8ce7-28ee173bc6af', 'position': '6', 'number': '6', 'length': '318066', 'recording': {'id': 'a395d484-58db-401
4-a194-9cf5ebdcd3ba', 'title': 'Behind the Wheel', 'length': '318040', 'disambiguation': 'album version'}, 'track_or
_recording_length': '318066'}, {'id': 'bc2ffc8f-4f35-4e92-b04c-fcdc1e97cb57', 'position': '7', 'number': '7', 'lengt
h': '224000', 'recording': {'id': 'bf8185c2-2a67-45cd-9b07-3711474b47dc', 'title': 'I Want You Now', 'length': '2245
33', 'disambiguation': 'album version'}, 'track_or_recording_length': '224000'}, {'id': 'ec8645e0-d1c8-4e4e-b326-809
aaacfb6c3', 'position': '8', 'number': '8', 'length': '172000', 'recording': {'id': 'ed59a1c7-0a39-4487-ad92-de7b7bc
7c872', 'title': 'To Have and to Hold', 'length': '171493'}, 'track_or_recording_length': '172000'}, {'id': '309516f
3-2c62-44ad-8bb3-7e35fc326034', 'position': '9', 'number': '9', 'length': '257773', 'recording': {'id': 'debd6061-0b
84-471f-aa60-74b84a280429', 'title': 'Nothing', 'length': '258000', 'disambiguation': 'album version'}, 'track_or_re
cording_length': '257773'}, {'id': 'c9a45283-c5dc-476c-8b7c-0a21f57650bb', 'position': '10', 'number': '10', 'length
': '325426', 'recording': {'id': 'be3809e3-19a1-43fe-b1a2-887df7906a57', 'title': 'Pimpf / Interlude #1: Mission Imp
ossible', 'length': '298000'}, 'track_or_recording_length': '325426'}, {'id': '0ac4f99f-ea24-44e1-85d3-980f1d81df3f'
, 'position': '11', 'number': '11', 'length': '305240', 'recording': {'id': 'f4585759-1c02-403f-9826-93337f34d2ba', 
'title': 'Agent Orange', 'length': '305240'}, 'track_or_recording_length': '305240'}, {'id': 'c5e9dfb5-e847-4237-b33
7-83cd265de0b7', 'position': '12', 'number': '12', 'length': '297666', 'recording': {'id': 'af0ed107-e2b7-48f0-a6ca-
365b5199ac2a', 'title': 'Never Let Me Down Again (Aggro mix)', 'length': '297306'}, 'track_or_recording_length': '29
7666'}, {'id': '6fbbfed5-f1a7-4fd1-90df-c0bccc411cad', 'position': '13', 'number': '13', 'length': '156333', 'record
ing': {'id': 'a8754c7f-856d-460a-976c-6a339c86518b', 'title': 'To Have and to Hold (Spanish Taster)', 'length': '156
000'}, 'track_or_recording_length': '156333'}, {'id': '49892570-eda5-4c5b-bb06-3f9486c5342e', 'position': '14', 'num
ber': '14', 'title': 'Pleasure, Little Treasure', 'length': '335893', 'recording': {'id': 'acbe9e0b-8baf-4ec9-938a-9
0899bec054c', 'title': 'Pleasure, Little Treasure (Glitter mix)', 'length': '336000'}, 'track_or_recording_length': 
'335893'}], 'track-count': 14}], 'medium-count': 1}}[2024-10-09 22:26:43 +0000] [8] [ERROR] Error handling request /
submit                                                                                                              
databass  | Traceback (most recent call last):                                                                      
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 1344, in do_open                             
databass  |     h.request(req.get_method(), req.selector, req.data, headers,                                        
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1336, in request                                
databass  |     self._send_request(method, url, body, headers, encode_chunked)                                      
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1382, in _send_request                          
databass  |     self.endheaders(body, encode_chunked=encode_chunked)                                                
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1331, in endheaders                             
databass  |     self._send_output(message_body, encode_chunked=encode_chunked)                                      
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1091, in _send_output                           
databass  |     self.send(msg)                                                                                      
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1035, in send                                   
databass  |     self.connect()                                                                                      
databass  |   File "/usr/local/lib/python3.12/http/client.py", line 1477, in connect                                
databass  |     self.sock = self._context.wrap_socket(self.sock,                                                    
databass  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                    
databass  |   File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket                                     
databass  |     return self.sslsocket_class._create(                                                                
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                
databass  |   File "/usr/local/lib/python3.12/ssl.py", line 1041, in _create                                        
databass  |     self.do_handshake()
databass  |   File "/usr/local/lib/python3.12/ssl.py", line 1319, in do_handshake
databass  |     self._sslobj.do_handshake()
databass  | ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
databass  | 
databass  | During handling of the above exception, another exception occurred:
databass  | 
databass  | Traceback (most recent call last):
databass  |   File "/usr/local/lib/python3.12/site-packages/musicbrainzngs/musicbrainz.py", line 497, in _safe_read
databass  |     f = opener.open(req)
databass  |         ^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 521, in open
databass  |     response = meth(req, response)
databass  |                ^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 630, in http_response
databass  |     response = self.parent.error(
databass  |                ^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 553, in error
databass  |     result = self._call_chain(*args)
databass  |              ^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 492, in _call_chain
databass  |     result = func(*args)
databass  |              ^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 745, in http_error_302
databass  |     return self.parent.open(new, timeout=req.timeout)
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 515, in open
databass  |     response = self._open(req, data)
databass  |                ^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 532, in _open
databass  |     result = self._call_chain(self.handle_open, protocol, protocol +
databass  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 492, in _call_chain
databass  |     result = func(*args)
databass  |              ^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 1392, in https_open
databass  |     return self.do_open(http.client.HTTPSConnection, req,
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/urllib/request.py", line 1347, in do_open
databass  |     raise URLError(err)
databass  | urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable
 to get local issuer certificate (_ssl.c:1000)>
databass  | 
databass  | During handling of the above exception, another exception occurred:
databass  | 
databass  | Traceback (most recent call last):
databass  |   File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/sync.py", line 134, in handle
databass  |     self.handle_request(listener, req, client, addr)
databass  |   File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/sync.py", line 177, in handle_request
databass  |     respiter = self.wsgi(environ, resp.start_response)
databass  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1498, in __call__
databass  |     return self.wsgi_app(environ, start_response)
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1476, in wsgi_app
databass  |     response = self.handle_exception(e)
databass  |                ^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
databass  |     response = self.full_dispatch_request()
databass  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
databass  |     rv = self.handle_user_exception(e)
databass  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
databass  |     rv = self.dispatch_request()
databass  |          ^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
databass  |     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-retu
rn]
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/databass/databass/routes.py", line 199, in submit
databass  |     image_filepath = Util.get_image(
databass  |                      ^^^^^^^^^^^^^^^
databass  |   File "/databass/databass/api/util.py", line 101, in get_image
databass  |     img = MusicBrainz.get_image(mbid)
databass  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/databass/databass/api/musicbrainz.py", line 251, in get_image
databass  |     raise e
databass  |   File "/databass/databass/api/musicbrainz.py", line 239, in get_image
databass  |     return mbz.get_release_group_image_front(mbid, size='250')
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/musicbrainzngs/caa.py", line 133, in get_release_group_i
mage_front
databass  |     return get_image(releasegroupid, "front", size=size,
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/musicbrainzngs/caa.py", line 187, in get_image
databass  |     return _caa_request(mbid, coverid, size=size, entitytype=entitytype)
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/musicbrainzngs/caa.py", line 79, in _caa_request
databass  |     resp = musicbrainz._safe_read(opener, req, None)
databass  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
databass  |   File "/usr/local/lib/python3.12/site-packages/musicbrainzngs/musicbrainz.py", line 525, in _safe_read
databass  |     raise NetworkError(cause=exc)
databass  | musicbrainzngs.musicbrainz.NetworkError: caused by: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] cert
ificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>

see if this is something on my end also

chunned commented 1 month ago

Root cause of the error is due to the Archive.org DDoS/site downtime (TIL CoverArtArchive is joint project between MusicBrainz and Internet Archive)

Adding fallback to Discogs regardless