AlexCSDev / PatreonDownloader

Powerful tool for downloading content posted by creators on patreon.com. Supports content hosted on patreon itself as well as external sites (additional plugins might be required).
MIT License
928 stars 95 forks source link

Key not present in the dictionary. #138

Closed Spyridion closed 1 year ago

Spyridion commented 2 years ago

I got this error when the downloader tried to access the latest post a creator made. Here is the error log.

2022-08-26 10:38:34.8468 FATAL Fatal error, application will be closed: UniversalDownloaderPlatform.Engine.Exceptions.UniversalDownloaderPlatformException: Error while downloading https://www.patreon.com/file?h=71070371&i=11599619: The given key '71070371_71070371_attachment_marglocm1.png' was not present in the dictionary.
 ---> System.Collections.Generic.KeyNotFoundException: The given key '71070371_71070371_attachment_marglocm1.png' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at PatreonDownloader.Implementation.PatreonCrawledUrlProcessor.ProcessCrawledUrl(ICrawledUrl udpCrawledUrl, String downloadDirectory) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.Implementation\PatreonCrawledUrlProcessor.cs:line 175
   at UniversalDownloaderPlatform.Engine.DownloadManager.<>c__DisplayClass8_1.<<Download>b__0>d.MoveNext() in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 72
   --- End of inner exception stack trace ---
   at UniversalDownloaderPlatform.Engine.DownloadManager.<>c__DisplayClass8_1.<<Download>b__0>d.MoveNext() in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 101
--- End of stack trace from previous location ---
   at UniversalDownloaderPlatform.Engine.DownloadManager.Download(List`1 crawledUrls, String downloadDirectory, CancellationToken cancellationToken) in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 114
   at UniversalDownloaderPlatform.Engine.UniversalDownloader.Download(String url, String downloadDirectory, IUniversalDownloaderPlatformSettings settings) in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\UniversalDownloader.cs:line 204
   at PatreonDownloader.App.Program.RunPatreonDownloader(CommandLineOptions commandLineOptions) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.App\Program.cs:line 143
   at PatreonDownloader.App.Program.Main(String[] args) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.App\Program.cs:line 69
Spyridion commented 1 year ago

Hi, just coming back with the same error, but for a different creator.


 ---> System.Collections.Generic.KeyNotFoundException: The given key '72204852_72204852_media_de744809-6c89-43e1-9dd3-675f019cf66d_l0_001.jpg' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at PatreonDownloader.Implementation.PatreonCrawledUrlProcessor.ProcessCrawledUrl(ICrawledUrl udpCrawledUrl, String downloadDirectory) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.Implementation\PatreonCrawledUrlProcessor.cs:line 175
   at UniversalDownloaderPlatform.Engine.DownloadManager.<>c__DisplayClass8_1.<<Download>b__0>d.MoveNext() in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 72
   --- End of inner exception stack trace ---
   at UniversalDownloaderPlatform.Engine.DownloadManager.<>c__DisplayClass8_1.<<Download>b__0>d.MoveNext() in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 101
--- End of stack trace from previous location ---
   at UniversalDownloaderPlatform.Engine.DownloadManager.Download(List`1 crawledUrls, String downloadDirectory, CancellationToken cancellationToken) in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\DownloadManager.cs:line 114
   at UniversalDownloaderPlatform.Engine.UniversalDownloader.Download(String url, String downloadDirectory, IUniversalDownloaderPlatformSettings settings) in F:\Sources\BigProjects\PatreonDownloader\submodules\UniversalDownloaderPlatform\UniversalDownloaderPlatform.Engine\UniversalDownloader.cs:line 204
   at PatreonDownloader.App.Program.RunPatreonDownloader(CommandLineOptions commandLineOptions) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.App\Program.cs:line 143
   at PatreonDownloader.App.Program.Main(String[] args) in F:\Sources\BigProjects\PatreonDownloader\PatreonDownloader.App\Program.cs:line 69```
stventek commented 1 year ago

I had the same error on windows 11 and fixed it.

The problem was I did not have openssl installed.

for the installation I installed git and added the openssl that comes with git to the PATH.

C:\Program Files\Git\usr\bin\openssl.exe

AlexCSDev commented 1 year ago

Please try latest version, this might be fixed there.