It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Ok, so it's now downloading the games. I have one question though, if I had already downloaded the default language, will the english versions override the already downloaded games or just get added (or skipped if multilanguage)?
avatar
Kalanyr: At a glance, you're downloading spanish games, and while extras don't have languages and so are handed specially games are not, so if a game doesn't have a spanish version (eg because it only has an english version as far as GOG is concerned ) then you don't get anything,
avatar
doblete96: It was my understanding that skipping the language flag would download every language. I've just run .\gogrepoc.py update -os windows -full -lang en and it now lists 3 more games than before (so it did list allmost all games before, it seems). I'll launch a download when it finishes and see if there are any changes.
This is not correct. Gogrepoc attempts to detect your OS / Language automatically if one isn't specified and uses that.


avatar
doblete96: Ok, so it's now downloading the games. I have one question though, if I had already downloaded the default language, will the english versions override the already downloaded games or just get added (or skipped if multilanguage)?
This depends on if you're specifying a language for the update command or for something that uses the manifest.

For the update command only the specified languages will be kept in the manifest for updated items, so any other commands will see other language stuff as invalid.

For other commands, the barebones state ( which is usually overriden by the autodetect ) is everything in the manifest, with the specified language / os acting as filters, so they won't remove previous stuff (unless that's the purpose, eg verify and clean will remove stuff because that's what they do .
Post edited June 07, 2025 by Kalanyr
When trying to download "Workers & Resources: Soviet Republic", the script throws this error:

17:55:06 | 1418.6MB 0.0MB/s 1x workers_resources_soviet_republic/setup_workers__resources_soviet_republic_1.1.0.11_(82787)-1.bin
17:55:06 | 1.39GB remaining
17:56:05 | The unhandled exception was:
17:56:05 |
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 737, in _error_catcher
yield
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 883, in _raw_read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
urllib3.exceptions.IncompleteRead: IncompleteRead(9453568 bytes read, 1032192 more expected)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 1043, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 935, in read
data = self._raw_read(amt)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 861, in _raw_read
with self._error_catcher():
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 761, in _error_catcher
raise ProtocolError(arg, e) from e
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(9453568 bytes read, 1032192 more expected)', IncompleteRead(9453568 bytes read, 1032192 more expected))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\GOGBackup\gogrepoc.py", line 3194, in worker
dlsz = ioloop(tid, path, response, out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\GOGBackup\gogrepoc.py", line 2982, in ioloop
for chunk in response.iter_content(chunk_size=4*1024):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 818, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(9453568 bytes read, 1032192 more expected)', IncompleteRead(9453568 bytes read, 1032192 more expected))
17:56:05 | End exception report.
17:56:05 | The handled exception was:
17:56:05 |
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 737, in _error_catcher
yield
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 883, in _raw_read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
urllib3.exceptions.IncompleteRead: IncompleteRead(9453568 bytes read, 1032192 more expected)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 1043, in stream
data = self.read(amt=amt, decode_content=decode_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 935, in read
data = self._raw_read(amt)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 861, in _raw_read
with self._error_catcher():
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(value)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\response.py", line 761, in _error_catcher
raise ProtocolError(arg, e) from e
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(9453568 bytes read, 1032192 more expected)', IncompleteRead(9453568 bytes read, 1032192 more expected))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\GOGBackup\gogrepoc.py", line 3194, in worker
dlsz = ioloop(tid, path, response, out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\GOGBackup\gogrepoc.py", line 2982, in ioloop
for chunk in response.iter_content(chunk_size=4*1024):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 818, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(9453568 bytes read, 1032192 more expected)', IncompleteRead(9453568 bytes read, 1032192 more expected))
17:56:05 | End exception report.
17:56:06 | --
17:56:06 | total time: 0:07:00.591677
17:56:06 | exiting...

The command is the same I always used:
gogrepoc.py download -skipfiles *.sh *_flac.zip *_wav.zip *_AAC.zip *_wma.zip patch_*.* setup_the_witcher_3_wild_hunt_goty_*(1)*.* *32bit*.* *.pkg

(Witcher 3 for some reason downloaded twice, that's why I added it to -skipfiles)
I updated the gogrepoc.py to the dev branch and it worked fine when I tried downloading again.

No idea if the problem was on the GOG or script's side, though.
Post edited June 11, 2025 by piranha1
avatar
piranha1: I updated the gogrepoc.py to the dev branch and it worked fine when I tried downloading again.

No idea if the problem was on the GOG or script's side, though.
There's not enough information to be 100% sure but that should be a Server/Network error, it means the connection was closed with data outstanding and without any of the normal protocol indications that the connection will be closed.
avatar
doblete96: It was my understanding that skipping the language flag would download every language. I've just run .\gogrepoc.py update -os windows -full -lang en and it now lists 3 more games than before (so it did list allmost all games before, it seems). I'll launch a download when it finishes and see if there are any changes.
avatar
Kalanyr: This is not correct. Gogrepoc attempts to detect your OS / Language automatically if one isn't specified and uses that.

avatar
doblete96: Ok, so it's now downloading the games. I have one question though, if I had already downloaded the default language, will the english versions override the already downloaded games or just get added (or skipped if multilanguage)?
avatar
Kalanyr: This depends on if you're specifying a language for the update command or for something that uses the manifest.

For the update command only the specified languages will be kept in the manifest for updated items, so any other commands will see other language stuff as invalid.

For other commands, the barebones state ( which is usually overriden by the autodetect ) is everything in the manifest, with the specified language / os acting as filters, so they won't remove previous stuff (unless that's the purpose, eg verify and clean will remove stuff because that's what they do .
I tested one of the english games and it does have the other languages too, so it seems that everything worked fine. Thank you so much for both the support and the software!
Dumb question: What was the advantage of using -md5xmls?
I pulled my copy of gogrepoc.py from github today (2025.06.13). I was seeing the following error when trying to login

> python ../gogrepoc.py login
You must use a GOG or GOG Galaxy account, Google/Discord sign-ins are not currently supported.
Username: xxxxxxxxx
Password:
15:33:37 | attempting Galaxy login as 'xxxxxxxxx' ...
15:33:39 | fatal...
Traceback (most recent call last):
File "../gogrepoc.py", line 4299, in <module>
main(process_argv(sys.argv))
File "../gogrepoc.py", line 4010, in main
cmd_login(args.username, args.password)
File "../gogrepoc.py", line 1850, in cmd_login
if token_data['totp_url'] is not None:
~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'totp_url'

I was able to patch the code as follows:

diff gogrepoc/gogrepoc-2025.06.13/gogrepoc-main/gogrepoc.py gogrepoc.py
1850c1850,1855
< if token_data['totp_url'] is not None:
---
>
> totp_url = token_data.get('totp_url')
> #if token_data['totp_url'] is not None:
> if totp_url is not None:
> # Proceed with TOTP-related logic
> print(f"TOTP URL: {totp_url}")

I hope this helps anyone who runs into the same issue.
Good catch, I would suggest for simplicity/brevity:

if 'totp_url' in token_data:
...



Edit:

One more request, could you fix the storage directory argument, GAME_STORAGE_DIR is never used and every time I download a new version of this, I always have to spend 5 mins finding and editing it.

Thanks in advance.

diff --git a/gogrepoc.py b/gogrepoc.py
index 236bdd0..47fb69c 100755
--- a/gogrepoc.py
+++ b/gogrepoc.py
@@ -1593,7 +1593,7 @@ def process_argv(argv):


g1 = sp1.add_parser('download', help='Download all your GOG games and extra files')
- g1.add_argument('savedir', action='store', help='directory to save downloads to', nargs='?', default='.')
+ g1.add_argument('savedir', action='store', help='directory to save downloads to', nargs='?', default=GAME_STORAGE_DIR)
g1.add_argument('-dryrun', action='store_true', help='display, but skip downloading of any files')
g1.add_argument('-skipgalaxy', action='store_true', help='skip downloading Galaxy installers (Deprecated)' )
g1.add_argument('-skipstandalone', action='store_true', help='skip downloading standlone installers (Deprecated)')
Post edited June 14, 2025 by lupineshadow
avatar
chalice: Dumb question: What was the advantage of using -md5xmls?
Short answer:
If you need to ask, then you don't need this, gogrepoc automatically downloads the most recent version from the server whenever it needs it internally.

Longer answer:
These are the MD5 checksums for individual sequences of bits inside the corresponding file, it's only enough data to detect an error, the correction method is to redownload that chunk, but you have to be online and connected to the GOG server to do that, so you can just download the MD5 chunk data first ( you pretty much have too in fact, because there's no guarantee the stored data is still good or the file to download hasn't been replaced with a newer version you need to download instead ).
avatar
tanukiretro: I pulled my copy of gogrepoc.py from github today (2025.06.13). I was seeing the following error when trying to login

> python ../gogrepoc.py login
You must use a GOG or GOG Galaxy account, Google/Discord sign-ins are not currently supported.
Username: xxxxxxxxx
Password:
15:33:37 | attempting Galaxy login as 'xxxxxxxxx' ...
15:33:39 | fatal...
Traceback (most recent call last):
File "../gogrepoc.py", line 4299, in <module>
main(process_argv(sys.argv))
File "../gogrepoc.py", line 4010, in main
cmd_login(args.username, args.password)
File "../gogrepoc.py", line 1850, in cmd_login
if token_data['totp_url'] is not None:
~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'totp_url'

I was able to patch the code as follows:

diff gogrepoc/gogrepoc-2025.06.13/gogrepoc-main/gogrepoc.py gogrepoc.py
1850c1850,1855
< if token_data['totp_url'] is not None:
---
>
> totp_url = token_data.get('totp_url')
> #if token_data['totp_url'] is not None:
> if totp_url is not None:
> # Proceed with TOTP-related logic
> print(f"TOTP URL: {totp_url}")

I hope this helps anyone who runs into the same issue.
Do you have an Authenticator setup ? Asking because I've got a GitHub report on a very similar issue but they said they did have an Authenticator but as far as I can tell this error should only occur for people without an Authenticator setup,
I've uploaded a potential fix to the Dev branch let me know if it solves the issue.
avatar
chalice: Dumb question: What was the advantage of using -md5xmls?
avatar
Kalanyr: Short answer:
If you need to ask, then you don't need this, gogrepoc automatically downloads the most recent version from the server whenever it needs it internally.

Longer answer:
These are the MD5 checksums for individual sequences of bits inside the corresponding file, it's only enough data to detect an error, the correction method is to redownload that chunk, but you have to be online and connected to the GOG server to do that, so you can just download the MD5 chunk data first ( you pretty much have too in fact, because there's no guarantee the stored data is still good or the file to download hasn't been replaced with a newer version you need to download instead ).
So in theory my downloads get faster (because smaller) but my update takes longer?

I ask because I needed about an hour for the step - Cleaning up !md5_xmls - in the last update.
Library is rather large.
Post edited June 14, 2025 by chalice
avatar
Kalanyr: Short answer:
If you need to ask, then you don't need this, gogrepoc automatically downloads the most recent version from the server whenever it needs it internally.

Longer answer:
These are the MD5 checksums for individual sequences of bits inside the corresponding file, it's only enough data to detect an error, the correction method is to redownload that chunk, but you have to be online and connected to the GOG server to do that, so you can just download the MD5 chunk data first ( you pretty much have too in fact, because there's no guarantee the stored data is still good or the file to download hasn't been replaced with a newer version you need to download instead ).
avatar
chalice: So in theory my downloads get faster (because smaller) but my update takes longer?

I ask because I needed about an hour for the step - Cleaning up !md5_xmls - in the last update.
Library is rather large.
No, if you don't use them yourself there's no use to keeping the MD5 xml files, and they will slow things down a bit. They are provided as a service for people who have some way to use them (you could use them to detect what specific part of a downloaded file is corrupted or to work out how much of a partially downloaded file remains to download, if you had the programming knowledge ). Gogrepoc always fetches a new version of these files from the server directly if they are needed, because they are never needed in a context when that isn't possible and making sure the metadata matches that on the server is super important for this.

ETA - gogrepoc always keeps the overall MD5 of each full file stored in the manifest, where that is available, so it can detect corruption on the file level, theoretically there's a risk of this going wrong at a level where the chunk verification doesn't, but because gogrepoc also checks the file sizes the chances of this happening are at the level where you're more likely to get hit by a meteor while getting struck by lightning while the meteor is also getting struck by lightning.
Post edited June 15, 2025 by Kalanyr
avatar
chalice: So in theory my downloads get faster (because smaller) but my update takes longer?

I ask because I needed about an hour for the step - Cleaning up !md5_xmls - in the last update.
Library is rather large.
avatar
Kalanyr: No, if you don't use them yourself there's no use to keeping the MD5 xml files, and they will slow things down a bit. They are provided as a service for people who have some way to use them (you could use them to detect what specific part of a downloaded file is corrupted or to work out how much of a partially downloaded file remains to download, if you had the programming knowledge ). Gogrepoc always fetches a new version of these files from the server directly if they are needed, because they are never needed in a context when that isn't possible and making sure the metadata matches that on the server is super important for this.

ETA - gogrepoc always keeps the overall MD5 of each full file stored in the manifest, where that is available, so it can detect corruption on the file level, theoretically there's a risk of this going wrong at a level where the chunk verification doesn't, but because gogrepoc also checks the file sizes the chances of this happening are at the level where you're more likely to get hit by a meteor while getting struck by lightning while the meteor is also getting struck by lightning.
Thanks a lot Kalanyr for the explanation. I assume than that I better turn it off since the use case iseems to be using it with rsync or something similar. I got the background as a systems administrator but I´m definitely not a coder. Scripting and some debugging of code is the top of my proficiency. Will you by chance updete the readme for the options at github?
And I want to add a general thank you to you. Your code is a big help to me for years now.
Post edited June 15, 2025 by chalice