Downloaded text file from CDN is missing content #409
-
I've been trying to use this package to download text files from the game files, but the downloaded text files from this package are missing a lot of lines compared to the ones I have in my game files. Here is the code snippet for the code I'm using to download the text files (In this example I'm downloading 'csgo_english.txt' from Counter Strike Global Offensive public branch):
The 'downloaded_csgo_english.txt' was 1.5 MB while the csgo_english.txt from my game files is over 5 MB. Missing lines starting from line 7826 till 31918 (24093 lines missing). The rest were in there but this middle chunk was missing completely in my 'downloaded_csgo_english.txt'. What am I doing wrong in this situation? Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Got it working by changing .read() method to .readlines() method. Now "downloaded_csgo_english.txt" is identical to the one downloaded using the real steam client. If anybody has a more efficient solution than this would love to hear it.
|
Beta Was this translation helpful? Give feedback.
-
This looks like a bug when reading the entire file at once, and chunks are being skipped. Reading it in small chunk sidesteps the bug. |
Beta Was this translation helpful? Give feedback.
This looks like a bug when reading the entire file at once, and chunks are being skipped. Reading it in small chunk sidesteps the bug.