WhosMyName / RealBandcampMusicDiscovery

GUI-based Utility that allows you to "discover" Music on Bandcamp.com - the expected "track"
GNU General Public License v2.0
4 stars 0 forks source link

Shit is going down in 4D #12

Closed WhosMyName closed 5 years ago

WhosMyName commented 5 years ago

Start RBMC select tags and fetch them, wait 5 Mins then....

2019-08-09 14:02:44,091 | ERROR | webconnector rbmd.webconnector 13897 139875442292480 |           get_albums() - Line 151 | Psychic Graveyard - The Next World EP has thrown Exception:
HTTPSConnectionPool(host='skingraftrecords.bandcamp.com', port=443): Pool is closed.
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 227, in _get_conn
    conn = self.pool.get(block=self.block, timeout=timeout)
AttributeError: 'NoneType' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 591, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "/usr/lib/python3.7/site-packages/urllib3/connectionpool.py", line 230, in _get_conn
    raise ClosedPoolError(self, "Pool is closed.")
urllib3.exceptions.ClosedPoolError: HTTPSConnectionPool(host='skingraftrecords.bandcamp.com', port=443): Pool is closed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/koro/Documents/GitKrakken/RealBandcampMusicDiscovery/src/webconnector.py", line 148, in get_albums
    album = future.result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/koro/Documents/GitKrakken/RealBandcampMusicDiscovery/src/webconnector.py", line 162, in update_album_metadata
    resp = self.session.get(album.url)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.7/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='skingraftrecords.bandcamp.com', port=443): Pool is closed.

"Funny" thing is that all the albums disappear as soon as

2019-08-09 14:02:54,307 | ERROR | userinterface rbmd.ui 13891 139875612231296 |  uncaught_exceptions() - Line 37 | Uncaught Exception of type <class 'TypeError'> was caught: arguments did not match any overloaded call:
  loadFromData(self, bytes, format: str = None, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'str'
  loadFromData(self, Union[QByteArray, bytes, bytearray], format: str = None, flags: Union[Qt.ImageConversionFlags, Qt.ImageConversionFlag] = Qt.AutoColor): argument 1 has unexpected type 'str'
Traceback:
None
NoneType: None
2019-08-09 14:03:02,406 | INFO | htmlparser rbmd.htmlparser 13897 139875442292480 |         parse_albums() - Line 49 | Parsing Albums
2019-08-09 14:03:02,718 | INFO | userinterface rbmd.ui 13891 139875612231296 |        update_layout() - Line 368 | Refreshing Layout
  File "userinterface.py", line 393, in msgcapture
    self.analyze(self.recieve())
  File "userinterface.py", line 402, in analyze
    self.process_albums(msg)
  File "userinterface.py", line 323, in process_albums
    self.update_layout()
  File "userinterface.py", line 384, in update_layout
    self.add_album(album)
  File "userinterface.py", line 349, in add_album
    pix.loadFromData(album.cover)

hits the deck. QwQ

WhosMyName commented 5 years ago

Should be closed with Commit: 1c0cfe5c2075a1884e7c18e154bb01581f492249 Increased Connection Pool Cache, Size and Max Retries, so that should have fixed it + fixed fetching from empty queue after check???

WhosMyName commented 4 years ago

The problem lies in the network connection speed:

Still don't know why the parsed albums disappear tho...
Also I didn't really fix the empty queueueueue problem.
I did add the correct exception to handle, but this'll never really be fixed due to how multiprocessing.Queues work. Checks are already in place, but well....