casualsnek / onthespot

qt based music downloader written in python
GNU General Public License v2.0
914 stars 78 forks source link

[BUG]OntheSpot doesn't open #154

Open fionabristol opened 1 month ago

fionabristol commented 1 month ago

Fails to launch, terminal output is:

OTS Version :  0.5
Config version:  0.5
Attempting to use system ffmpeg binary !
Using ffmpeg binary at:  /usr/bin/ffmpeg
[2024-09-13 14:31:03,695 :: runtimedata :: /usr/lib/python3.12/site-packages/onthespot/runtimedata.py -> 49:    handle_exception() :: CRITICAL] -> Uncaught exception
Traceback (most recent call last):
  File "/usr/bin/onthespot_gui", line 5, in <module>
    from onthespot import main
  File "/usr/lib/python3.12/site-packages/onthespot/__init__.py", line 4, in <module>
    from .gui.mainui import MainWindow
  File "/usr/lib/python3.12/site-packages/onthespot/gui/mainui.py", line 9, in <module>
    from ..utils.spotify import search_by_term, get_thumbnail
  File "/usr/lib/python3.12/site-packages/onthespot/utils/spotify.py", line 16, in <module>
    from librespot.audio.decoders import AudioQuality
  File "/usr/lib/python3.12/site-packages/librespot/__init__.py", line 3, in <module>
    from librespot.proto.Keyexchange_pb2 import BuildInfo, Platform, Product, ProductFlags
  File "/usr/lib/python3.12/site-packages/librespot/proto/Keyexchange_pb2.py", line 31, in <module>
    _descriptor.EnumValueDescriptor(
  File "/usr/lib/python3.12/site-packages/google/protobuf/descriptor.py", line 920, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

System Information:

justin025 commented 1 month ago

run PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python onthespot

to set this permanently add the following line to your bashrc export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python