[GH-ISSUE #58] [Bug Report] Protobuf Direct Created Descriptor #47

Closed
opened 2026-02-27 04:57:16 +03:00 by kerem · 4 comments
Owner

Originally created by @alitteration on GitHub (Aug 19, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/58

Originally assigned to: @Googolplexed0 on GitHub.

Bug Description
Protobuf issue, i keep on getting _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors should not be created directly, but only retrieved from their parent.

Bug Triggering Command
python3 -m zotify "https://xxx"

Error Traceback / Logs

File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/main.py", line 11, in
from zotify.app import client
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/app.py", line 5, in
from zotify.album import download_album, download_artist_albums
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/album.py", line 1, in
from zotify.config import Zotify
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/config.py", line 9, in
from librespot.core import Session, OAuth
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/core.py", line 60, in
from librespot.proto.spotify.login5.v3 import Login5_pb2 as Login5
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/Login5_pb2.py", line 15, in
from ..v3.identifiers import Identifiers as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/identifiers/Identifiers.py", line 32, in
_descriptor.FieldDescriptor(
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 556, in new
_message.Message._CheckCalledFromGeneratedFile()

Config File
Doesn't exist yet

Zotify Version
Latest

Additional Context
Add any other context about the problem here. Include additional track urls if reproducible.

Originally created by @alitteration on GitHub (Aug 19, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/58 Originally assigned to: @Googolplexed0 on GitHub. **Bug Description** Protobuf issue, i keep on getting _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors should not be created directly, but only retrieved from their parent. **Bug Triggering Command** python3 -m zotify "https://xxx" **Error Traceback / Logs** File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/__main__.py", line 11, in <module> from zotify.app import client File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/app.py", line 5, in <module> from zotify.album import download_album, download_artist_albums File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/album.py", line 1, in <module> from zotify.config import Zotify File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/zotify/config.py", line 9, in <module> from librespot.core import Session, OAuth File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/core.py", line 60, in <module> from librespot.proto.spotify.login5.v3 import Login5_pb2 as Login5 File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/Login5_pb2.py", line 15, in <module> from ..v3.identifiers import Identifiers as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2 File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/identifiers/Identifiers.py", line 32, in <module> _descriptor.FieldDescriptor( File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 556, in __new__ _message.Message._CheckCalledFromGeneratedFile() **Config File** Doesn't exist yet **Zotify Version** Latest **Additional Context** Add any other context about the problem here. Include additional track urls if reproducible.
kerem 2026-02-27 04:57:16 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Googolplexed0 commented on GitHub (Aug 21, 2025):

Sorry, but I have absolutely no clue what this issue means or how to fix it. It's obviously caused by the new implementation of Login5 (to fix #48) but I neither created the protobuf (that was already upstream) nor know much about the protocol.

from ..v3.identifiers import Identifiers as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/identifiers/Identifiers.py", line 32, in
_descriptor.FieldDescriptor(
File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 556, in new
_message.Message._CheckCalledFromGeneratedFile()

Nothing is actually even running yet, for you it's failing at the import stage. This is extra strange since everything imports fine on my machine and most other users'. Try to do some more research, since this seems like a non-Zotify-specific issue.

Maybe try checking the version of your protobuf library? Should be locked to exactly protobuf==3.20.1.

<!-- gh-comment-id:3208912074 --> @Googolplexed0 commented on GitHub (Aug 21, 2025): Sorry, but I have absolutely no clue what this issue means or how to fix it. It's obviously caused by the new implementation of Login5 (to fix #48) but I neither created the protobuf (that was already upstream) nor know much about the protocol. > from ..v3.identifiers import Identifiers as spotify_dot_login5_dot_v3_dot_identifiers_dot_identifiers__pb2 > File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/librespot/proto/spotify/login5/v3/identifiers/Identifiers.py", line 32, in > _descriptor.FieldDescriptor( > File "/home/sedative/zotify-main/my_project/my_env/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 556, in **new** > _message.Message._CheckCalledFromGeneratedFile() Nothing is actually even running yet, for you it's failing at the import stage. This is extra strange since everything imports fine on my machine and most other users'. Try to do some more research, since this seems like a non-Zotify-specific issue. Maybe try checking the version of your `protobuf` library? Should be locked to exactly `protobuf==3.20.1`.
Author
Owner

@Googolplexed0 commented on GitHub (Aug 22, 2025):

This might fix it. Force reinstall and try again.

<!-- gh-comment-id:3212675237 --> @Googolplexed0 commented on GitHub (Aug 22, 2025): [This](https://github.com/Googolplexed0/librespot-python/commit/5d0784e1c99d72e6c99f38023eca0c5bb9643a8e) might fix it. Force reinstall and try again.
Author
Owner

@NickDegrasse commented on GitHub (Aug 22, 2025):

This might fix it. Force reinstall and try again.

Just force reinstalled and it appears to be running now, thanks!

<!-- gh-comment-id:3212876672 --> @NickDegrasse commented on GitHub (Aug 22, 2025): > [This](https://github.com/Googolplexed0/librespot-python/commit/5d0784e1c99d72e6c99f38023eca0c5bb9643a8e) might fix it. Force reinstall and try again. Just force reinstalled and it appears to be running now, thanks!
Author
Owner

@alitteration commented on GitHub (Aug 22, 2025):

Ty will give it a shot!

<!-- gh-comment-id:3213915278 --> @alitteration commented on GitHub (Aug 22, 2025): Ty will give it a shot!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#47
No description provided.