[GH-ISSUE #91] [Bug Report] Podcast Episode is None #77

Closed
opened 2026-02-27 04:57:24 +03:00 by kerem · 1 comment
Owner

Originally created by @elly-belfort on GitHub (Sep 29, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/91

Originally assigned to: @Googolplexed0 on GitHub.

Zotify Version
v0.9.27

Bug Description
Audiobook download fails

Bug Triggering Command
python -m zotify --debug https://open.spotify.com/show/0UEqj4d3z9Mn3WFDFNf1DD

Error Traceback / Logs
Console output:

DEBUG                                                                                               
###   config_DEBUG.json saved to /Users/ellyb/Library/Application Support/Zotify   ###              
###   zotify_DEBUG_2025-09-29_11-52-00.log logging to /Users/ellyb/Music/Zotify Music   ###         
                                                                                                    
        [∙∙●] Logging in...                                                                                
DEBUG                                                                                               
Session Initialized Successfully                                                                    
Starting Download of 1 URLs                                                                         

        [∙∙●] Fetching episodes...
        [∙●∙] Fetching episode information...
        [∙∙∙] Preparing download...

Traceback (most recent call last):                                                                   
  File "<frozen runpy>", line 198, in _run_module_as_main                                           
  File "<frozen runpy>", line 88, in _run_code                                                      
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/__main__.py", line 127, in <module>             
    main()                                                                                          
    ~~~~^^                                                                                          
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/__main__.py", line 119, in main                 
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/app.py", line 257, in client
    download_from_urls(args.urls)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/app.py", line 44, in download_from_urls
    download_show(show_id, pbar_stack)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/podcast.py", line 65, in download_show
    download_episode(episode, pbar_stack)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ellyb/Projects/zotify2/zotify/zotify/podcast.py", line 93, in download_episode
    direct_download_url = resp["data"]["episode"]["audio"]["items"][-1]["url"]
                          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Contents of zotify_DEBUG_2025-09-29_11-52-00.log file showing the error/crash:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=accesspoint HTTP/1.1" 200 None
INFO:Librespot:Session:Created new session! device_id: a661c3f4b66761ca9d3a1a4034361c69cbe18c8f, ap: ap-gew4.spotify.com:80
INFO:Librespot:Session:Connection successfully!
INFO:Librespot:Session:Session.Receiver started
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=spclient HTTP/1.1" 200 None
INFO:Librespot:Session:Skipping 02
INFO:Librespot:Session:Received license_version: 0
INFO:Librespot:Session:Received country_code: AU
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443
DEBUG:Librespot:Session:Parsed product info: {'type': 'premium', 'ab-ad-player-targeting': '1', 'ab-watch-now': '0', 'ab_recently_played_feature_time_filter_threshold': 'com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30', 'active-session-days': '0', 'ad-formats-preroll-video': '0', 'ad-session-persistence': '1', 'ads': '0', 'app-developer': '0', 'arsenal_country': '1', 'audio-preview-url-template': 'https://p.scdn.co/mp3-preview/{id}', 'audio-quality': '1', 'audiobook-onboarding-completed': '0', 'autoplay': '1', 'browse-overview-enabled': '1', 'capping-bar-threshold': '3601', 'catalogue': 'premium', 'collection': '1', 'employee-free-opt-in': '0', 'enable-annotations': '2', 'enable-annotations-read': '0', 'enable-crossfade': '1', 'explicit-content': '1', 'financial-product': 'pr:premium,tc:0,rt:v2_AU_default_new-family-master-1m_27.99_AUD_default', 'head-file-caching': '1', 'head-files': '1', 'head-files-url': 'https://heads-fa-tls13.spotifycdn.com/head/{file_id}', 'high-bitrate': '1', 'image-url': 'https://i.scdn.co/image/{file_id}', 'incognito_mode_timeout': '21600', 'is_email_verified': '1', 'key-caching-auto-offline': '0', 'key-caching-max-count': '10000', 'key-caching-max-offline-seconds': '1800', 'key-memory-cache-mode': '1:15,300', 'libspotify': '1', 'license-acceptance-grace-days': '30', 'license-agreements': None, 'loudness-levels': '1:-5.0,0.0,3.0:-2.0', 'metadata-link-lookup-modes': '0', 'mobile': '1', 'mobile-payment': '0', 'multiuserplan-current-size': '5', 'multiuserplan-member-type': 'FAMILY_MANAGER', 'name': 'Spotify Premium', 'network-operator-premium-activation': '1', 'nft-disabled': '1', 'offline': '1', 'on-demand': '1', 'on-demand-trial-in-progress': '0', 'payment-state': None, 'payments-initial-campaign': 'default', 'payments-locked-state': '0', 'player-license': 'premium', 'player-license-v2': 'premium', 'playlist-annotations-markup': '0', 'preferred-locale': 'en', 'prefetch-keys': '1', 'prefetch-strategy': '18', 'prefetch-window-max': '2', 'product-expiry': None, 'public-toplist': '1', 'publish-activity': '1', 'publish-playlist': '1', 'radio': '1', 'rating-access': '1', 'remote-control': '6', 'request-time': '6', 'restrict-playlist-collaboration': '0', 'send-email': '1', 'shows-collection': '1', 'shows-collection-jam': '0', 'shuffle': '0', 'shuffle-algorithm': 'FRESH', 'sidebar-navigation-enabled': '0', 'storage-size-config': '10240,90,500,3', 'streaming': '1', 'streaming-rules': None, 'subscription-enddate': None, 'ugc-abuse-report': '1', 'ugc-abuse-report-url': 'https://support.spotify.com/abuse/?uri={uri}', 'unrestricted': '1', 'user-profile-show-invitation-codes': '0', 'video-cdn-sampling': '100', 'video-device-blacklisted': '0', 'video-keyframe-url': 'http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg', 'video-manifest-url': 'https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm', 'widevine-license-url': 'https://spclient.wg.spotify.com/widevine-license/v1/video/license'}
INFO:Librespot:Session:Skipping 1f
INFO:Librespot:Session:Skipping 69
DEBUG:Librespot:MercuryClient:Handling packet, cmd: 0xb5, seq: -6156658185127067648, flags: b'\x01', parts: 1
DEBUG:Librespot:MercuryClient:Couldn't dispatch Mercury event seq: -6156658185127067648, uri: hm://pusher/v1/connections/YTY2MWMzZjRiNjY3NjFjYTlkM2ExYTQwMzQzNjFjNjljYmUxOGM4ZitBUCt0Y3A6Ly8wYWIxNTFhZi5pcC5nZXc0LnNwb3RpZnkubmV0OjUwMDArRDc4MUIxREFFMDQwQURBRjE4RDA1MzI3Mzg4NkJFRkJFNTc1NDBFRTlBMURCNDg5NEMzMTREMDQ1M0RGMjAxNw%3D%3D, code: 200, payload: b''
DEBUG:Librespot:Session:Received 0x10: e4720747ab43adc3eec0b29b4055c89c54ec8287
INFO:Librespot:Session:Skipping unknown command cmd: 0x75, payload: b'\x00\x00\x01'
DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=dealer HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443
DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None
INFO:Librespot:TokenProvider:Login5 authentication successful, got access token
DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['playlist-read']
INFO:Librespot:Session:Authenticated as 12133925274!
DEBUG:zotify.debug:

Session Initialized Successfully

DEBUG:zotify.debug:Starting Download of 1 URLs

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443
DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None
INFO:Librespot:TokenProvider:Login5 authentication successful, got access token
DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['user-read-email', 'playlist-read-private', 'user-library-read', 'user-follow-read']
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443
DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/shows/0UEqj4d3z9Mn3WFDFNf1DD/episodes?limit=50&offset=0 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443
DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/episodes/5esE7qkrcN3U0Q4CHz3lWm HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api-partner.spotify.com:443
DEBUG:urllib3.connectionpool:https://api-partner.spotify.com:443 "GET /pathfinder/v1/query?operationName=getEpisode&variables=%7B%22uri%22:%22spotify:episode:5esE7qkrcN3U0Q4CHz3lWm%22%7D&extensions=%7B%22persistedQuery%22:%7B%22version%22:1,%22sha256Hash%22:%22224ba0fd89fcfdfb3a15fa2d82a6112d3f4e2ac88fba5c6713de04d1b72cf482%22%7D%7D HTTP/1.1" 200 None

Config File
No config.json file or config_DEBUG.json has been used.

Originally created by @elly-belfort on GitHub (Sep 29, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/91 Originally assigned to: @Googolplexed0 on GitHub. **Zotify Version** v0.9.27 **Bug Description** Audiobook download fails **Bug Triggering Command** python -m zotify --debug https://open.spotify.com/show/0UEqj4d3z9Mn3WFDFNf1DD **Error Traceback / Logs** Console output: ``` DEBUG ### config_DEBUG.json saved to /Users/ellyb/Library/Application Support/Zotify ### ### zotify_DEBUG_2025-09-29_11-52-00.log logging to /Users/ellyb/Music/Zotify Music ### [∙∙●] Logging in... DEBUG Session Initialized Successfully Starting Download of 1 URLs [∙∙●] Fetching episodes... [∙●∙] Fetching episode information... [∙∙∙] Preparing download... Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/Users/ellyb/Projects/zotify2/zotify/zotify/__main__.py", line 127, in <module> main() ~~~~^^ File "/Users/ellyb/Projects/zotify2/zotify/zotify/__main__.py", line 119, in main args.func(args) ~~~~~~~~~^^^^^^ File "/Users/ellyb/Projects/zotify2/zotify/zotify/app.py", line 257, in client download_from_urls(args.urls) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/ellyb/Projects/zotify2/zotify/zotify/app.py", line 44, in download_from_urls download_show(show_id, pbar_stack) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/Users/ellyb/Projects/zotify2/zotify/zotify/podcast.py", line 65, in download_show download_episode(episode, pbar_stack) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/Users/ellyb/Projects/zotify2/zotify/zotify/podcast.py", line 93, in download_episode direct_download_url = resp["data"]["episode"]["audio"]["items"][-1]["url"] ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ TypeError: 'NoneType' object is not subscriptable ``` Contents of `zotify_DEBUG_2025-09-29_11-52-00.log` file showing the error/crash: ``` DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=accesspoint HTTP/1.1" 200 None INFO:Librespot:Session:Created new session! device_id: a661c3f4b66761ca9d3a1a4034361c69cbe18c8f, ap: ap-gew4.spotify.com:80 INFO:Librespot:Session:Connection successfully! INFO:Librespot:Session:Session.Receiver started DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=spclient HTTP/1.1" 200 None INFO:Librespot:Session:Skipping 02 INFO:Librespot:Session:Received license_version: 0 INFO:Librespot:Session:Received country_code: AU DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): apresolve.spotify.com:443 DEBUG:Librespot:Session:Parsed product info: {'type': 'premium', 'ab-ad-player-targeting': '1', 'ab-watch-now': '0', 'ab_recently_played_feature_time_filter_threshold': 'com.spotify.gaia=30,driving-mode=120,spotify%3Ainternal%3Astartpage=30', 'active-session-days': '0', 'ad-formats-preroll-video': '0', 'ad-session-persistence': '1', 'ads': '0', 'app-developer': '0', 'arsenal_country': '1', 'audio-preview-url-template': 'https://p.scdn.co/mp3-preview/{id}', 'audio-quality': '1', 'audiobook-onboarding-completed': '0', 'autoplay': '1', 'browse-overview-enabled': '1', 'capping-bar-threshold': '3601', 'catalogue': 'premium', 'collection': '1', 'employee-free-opt-in': '0', 'enable-annotations': '2', 'enable-annotations-read': '0', 'enable-crossfade': '1', 'explicit-content': '1', 'financial-product': 'pr:premium,tc:0,rt:v2_AU_default_new-family-master-1m_27.99_AUD_default', 'head-file-caching': '1', 'head-files': '1', 'head-files-url': 'https://heads-fa-tls13.spotifycdn.com/head/{file_id}', 'high-bitrate': '1', 'image-url': 'https://i.scdn.co/image/{file_id}', 'incognito_mode_timeout': '21600', 'is_email_verified': '1', 'key-caching-auto-offline': '0', 'key-caching-max-count': '10000', 'key-caching-max-offline-seconds': '1800', 'key-memory-cache-mode': '1:15,300', 'libspotify': '1', 'license-acceptance-grace-days': '30', 'license-agreements': None, 'loudness-levels': '1:-5.0,0.0,3.0:-2.0', 'metadata-link-lookup-modes': '0', 'mobile': '1', 'mobile-payment': '0', 'multiuserplan-current-size': '5', 'multiuserplan-member-type': 'FAMILY_MANAGER', 'name': 'Spotify Premium', 'network-operator-premium-activation': '1', 'nft-disabled': '1', 'offline': '1', 'on-demand': '1', 'on-demand-trial-in-progress': '0', 'payment-state': None, 'payments-initial-campaign': 'default', 'payments-locked-state': '0', 'player-license': 'premium', 'player-license-v2': 'premium', 'playlist-annotations-markup': '0', 'preferred-locale': 'en', 'prefetch-keys': '1', 'prefetch-strategy': '18', 'prefetch-window-max': '2', 'product-expiry': None, 'public-toplist': '1', 'publish-activity': '1', 'publish-playlist': '1', 'radio': '1', 'rating-access': '1', 'remote-control': '6', 'request-time': '6', 'restrict-playlist-collaboration': '0', 'send-email': '1', 'shows-collection': '1', 'shows-collection-jam': '0', 'shuffle': '0', 'shuffle-algorithm': 'FRESH', 'sidebar-navigation-enabled': '0', 'storage-size-config': '10240,90,500,3', 'streaming': '1', 'streaming-rules': None, 'subscription-enddate': None, 'ugc-abuse-report': '1', 'ugc-abuse-report-url': 'https://support.spotify.com/abuse/?uri={uri}', 'unrestricted': '1', 'user-profile-show-invitation-codes': '0', 'video-cdn-sampling': '100', 'video-device-blacklisted': '0', 'video-keyframe-url': 'http://keyframes-fa.cdn.spotify.com/keyframes/v1/sources/{source_id}/keyframe/heights/{height}/timestamps/{timestamp_ms}.jpg', 'video-manifest-url': 'https://spclient.wg.spotify.com/manifests/v6/{type}/sources/{source_id}/options/supports_drm', 'widevine-license-url': 'https://spclient.wg.spotify.com/widevine-license/v1/video/license'} INFO:Librespot:Session:Skipping 1f INFO:Librespot:Session:Skipping 69 DEBUG:Librespot:MercuryClient:Handling packet, cmd: 0xb5, seq: -6156658185127067648, flags: b'\x01', parts: 1 DEBUG:Librespot:MercuryClient:Couldn't dispatch Mercury event seq: -6156658185127067648, uri: hm://pusher/v1/connections/YTY2MWMzZjRiNjY3NjFjYTlkM2ExYTQwMzQzNjFjNjljYmUxOGM4ZitBUCt0Y3A6Ly8wYWIxNTFhZi5pcC5nZXc0LnNwb3RpZnkubmV0OjUwMDArRDc4MUIxREFFMDQwQURBRjE4RDA1MzI3Mzg4NkJFRkJFNTc1NDBFRTlBMURCNDg5NEMzMTREMDQ1M0RGMjAxNw%3D%3D, code: 200, payload: b'' DEBUG:Librespot:Session:Received 0x10: e4720747ab43adc3eec0b29b4055c89c54ec8287 INFO:Librespot:Session:Skipping unknown command cmd: 0x75, payload: b'\x00\x00\x01' DEBUG:urllib3.connectionpool:https://apresolve.spotify.com:443 "GET /?type=dealer HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443 DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None INFO:Librespot:TokenProvider:Login5 authentication successful, got access token DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['playlist-read'] INFO:Librespot:Session:Authenticated as 12133925274! DEBUG:zotify.debug: Session Initialized Successfully DEBUG:zotify.debug:Starting Download of 1 URLs DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login5.spotify.com:443 DEBUG:urllib3.connectionpool:https://login5.spotify.com:443 "POST /v3/login HTTP/1.1" 200 None INFO:Librespot:TokenProvider:Login5 authentication successful, got access token DEBUG:Librespot:TokenProvider:Using Login5 access token for scopes: ['user-read-email', 'playlist-read-private', 'user-library-read', 'user-follow-read'] DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443 DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/shows/0UEqj4d3z9Mn3WFDFNf1DD/episodes?limit=50&offset=0 HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.spotify.com:443 DEBUG:urllib3.connectionpool:https://api.spotify.com:443 "GET /v1/episodes/5esE7qkrcN3U0Q4CHz3lWm HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api-partner.spotify.com:443 DEBUG:urllib3.connectionpool:https://api-partner.spotify.com:443 "GET /pathfinder/v1/query?operationName=getEpisode&variables=%7B%22uri%22:%22spotify:episode:5esE7qkrcN3U0Q4CHz3lWm%22%7D&extensions=%7B%22persistedQuery%22:%7B%22version%22:1,%22sha256Hash%22:%22224ba0fd89fcfdfb3a15fa2d82a6112d3f4e2ac88fba5c6713de04d1b72cf482%22%7D%7D HTTP/1.1" 200 None ``` **Config File** No `config.json` file or `config_DEBUG.json` has been used.
kerem 2026-02-27 04:57:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Googolplexed0 commented on GitHub (Oct 1, 2025):

Should be fixed with 75260bba36 on efficient-api branch.

<!-- gh-comment-id:3354390843 --> @Googolplexed0 commented on GitHub (Oct 1, 2025): Should be fixed with 75260bba363a74e323626a4da6ac559347808df6 on [efficient-api branch](https://github.com/Googolplexed0/zotify/tree/efficient-api).
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#77
No description provided.