applemusicrp
applemusicrp copied to clipboard
Error when changning songs.
Describe the bug While changing songs, an error would pop up saying "An unexpected error has occurred while trying to update your Discord status!".
To Reproduce Happened just changing songs rapidly (one change every second) error triggers around the 6th change and only errors 2 times, then on the third time just stops working.
Screenshots
OS
- Windows 11
- Version 3.2.1
Additional context --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "src\applemusicrp\applemusicrp.pyc", line 185, in rp_updater File "pypresence\presence.pyc", line 36, in update File "asyncio\base_events.pyc", line 646, in run_until_complete File "pypresence\baseclient.pyc", line 88, in read_output pypresence.exceptions.ServerError: Unknown error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "rich\logging.pyc", line 162, in emit File "rich\console.pyc", line 1646, in print File "rich\console.pyc", line 848, in exit File "rich\console.pyc", line 806, in exit_buffer File "rich\console.pyc", line 1990, in check_buffer AttributeError: 'Blackhole' object has no attribute 'fileno' Call stack: File "threading.pyc", line 973, in bootstrap File "threading.pyc", line 1016, in bootstrap_inner File "threading.pyc", line 953, in run File "src\applemusicrp\applemusicrp.pyc", line 189, in rp_updater File "logging_init.pyc", line 1512, in exception File "logging_init.pyc", line 1506, in error File "logging_init.pyc", line 1624, in log File "logging_init.pyc", line 1634, in handle File "logging_init.pyc", line 1696, in callHandlers File "logging_init_.pyc", line 968, in handle File "rich\logging.pyc", line 164, in emit Message: ServerError('Unknown error') Arguments: () --- Logging error --- Traceback (most recent call last): File "pystray_win32.pyc", line 401, in _dispatcher File "pystray_win32.pyc", line 213, in _on_notify File "pystray_base.pyc", line 324, in inner File "pystray_base.pyc", line 449, in call File "pystray_base.pyc", line 544, in wrapper0 File "src\applemusicrp\applemusicrp.pyc", line 224, in quit SystemExit: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "rich\logging.pyc", line 162, in emit
File "rich\console.pyc", line 1646, in print
File "rich\console.pyc", line 848, in exit
File "rich\console.pyc", line 806, in _exit_buffer
File "rich\console.pyc", line 1990, in check_buffer
AttributeError: 'Blackhole' object has no attribute 'fileno'
Call stack:
File "AppleMusicRP.py", line 3, in
I don't really know what to do besides tell you to restart the app, the error (pypresence.exceptions.ServerError
) is an issue with Discord's rich presence from the rapid song changing, which is not something I can really control
I don't really know what to do besides tell you to restart the app, the error (
pypresence.exceptions.ServerError
) is an issue with Discord's rich presence from the rapid song changing, which is not something I can really control
I honestly thought it was a rate limit issue and maybe recommend only allowing it to update (new song title, artist, etc) 1 time every 5 seconds. Not really sure if this interacts with the Discord API in anyway to start with....so might not even be a valid possibility.
hmmmm I don't think it would be a rate limiting issue anyway as the status is updated at a constant rate of 0.8 seconds (not a full second, in order to to take in account the time it actually takes to run the updating code) regardless of whether you change the playing song or not