Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload crashes on the large file: KeyError: 'x-goog-upload-url' #647

Open
ptabor opened this issue Aug 29, 2024 · 0 comments
Open

Upload crashes on the large file: KeyError: 'x-goog-upload-url' #647

ptabor opened this issue Aug 29, 2024 · 0 comments

Comments

@ptabor
Copy link

ptabor commented Aug 29, 2024

When trying to upload large file (>300MB audiobook):

The library is crashing with:

# Traceback (most recent call last):
# File "/yt-music/upload.py", line 40, in run
# result = ytmusic.upload_song(file)
# ^^^^^^^^^^^^^^^^^^^^^^^^^
# File "/home/nonroot/.local/lib/python3.12/site-packages/ytmusicapi/mixins/uploads.py", line 237, in upload_song
# upload_url = response.headers["X-Goog-Upload-URL"]
# ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
# File "/home/nonroot/.local/lib/python3.12/site-packages/requests/structures.py", line 52, in __getitem__
# return self._store[key.lower()][1]
# ~~~~~~~~~~~^^^^^^^^^^^^^
# KeyError: 'x-goog-upload-url'
#
# During handling of the above exception, another exception occurred:

Expected output: The upload function should return a failed result.

@ptabor ptabor changed the title Upload crashes on the large file Upload crashes on the large file: KeyError: 'x-goog-upload-url' Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant