[GH-ISSUE #331] [BUG] unpack requires a buffer of 4 bytes #61

Open
opened 2026-02-27 08:11:43 +03:00 by kerem · 0 comments
Owner

Originally created by @Masterolic on GitHub (Jan 26, 2026).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/331

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Client Information (please complete the following information):

  • OS: [e.g. Windows]
  • Python Version [e.g. 3.9.0]
  • Library Version [e.g. 0.0.1]

Additional context
Add any other context about the problem here.

File "/usr/local/lib/python3.12/dist-packages/librespot/core.py", line 1758, in create session.connect()

File "/usr/local/lib/python3.12/dist-packages/librespot/core.py", line ap_response_message_length = self.connection.read_int()

1117, in connect

File

"/usr/local/lib/python3.12/dist-packages/librespot/core.py", line 2042, in read_int

return struct.unpack(">i", self.read(4))[0]

struct.error: unpack requires a buffer of 4 bytes

Seems like Spotify is changing something happening always to random accounts

Originally created by @Masterolic on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/331 **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Client Information (please complete the following information):** - OS: [e.g. Windows] - Python Version [e.g. 3.9.0] - Library Version [e.g. 0.0.1] **Additional context** Add any other context about the problem here. File "/usr/local/lib/python3.12/dist-packages/librespot/core.py", line 1758, in create session.connect() File "/usr/local/lib/python3.12/dist-packages/librespot/core.py", line ap_response_message_length = self.connection.read_int() 1117, in connect File "/usr/local/lib/python3.12/dist-packages/librespot/core.py", line 2042, in read_int return struct.unpack(">i", self.read(4))[0] struct.error: unpack requires a buffer of 4 bytes Seems like Spotify is changing something happening always to random accounts
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/librespot-python-kokarare1212#61
No description provided.