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

×
avatar
ChFra: Lines 3632+3633 read here (without the indentation):
===================
if itm.unreleased:
continue
===================
If I understand Python correctly, there should no exception be raised.
Are you running the current version?
The text above between the == is what "my" line 3632 (+the next line) is like, the line number your error message mentions.
avatar
Modelsson: I'm runing 3.13.3 but in Win11 App execution aliases I have "python3.exe" off and only "python.exe" on.
[…]
I am using the latest version of gogrepoc. I copied the raw code and made a py file myself.
I've been referring to the script version, not the python version, but you answered that.
avatar
Modelsson: If I understand you correctly, I need to add your code to the lines you suggested into the py file?
No! It's already there, if you'r e really using the latest version. Unfortunately, you can't easily see that, but can always make a fresh copy from the source and compare, just to be sure. I just was astonished where this exception came from.
avatar
Modelsson: And I can confirm the almost 8 MB/S speed of download. I thought GOG just lowered it. Though I can download from GOG directly at 50 MB/s
This IS directly from GOG, that "gogrepoc.py" thing does quite the same as your browser. It tells GOG, however, that it is not your browser, so they might limit the download rate for non-interactive script users in favour of those people impatiently sitting in front of their browsers. I don't know.
avatar
Modelsson: Greetings and a big thank you for this great script!

I used it on my WIN10 with no problem. Now on WIN1124H2 some problems have arisen.

I solved it with using python 2+ since 3+ gave me file writing errors.

Now the update and download, clean and trash commands work flawlessly, but the verify command is still giving me problems that I cannot solve and can't find the solution to on stackoverflow. This is what I get in my window:

20:01:34 | scanning manifest for renames...
20:01:34 | fatal...
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 4263, in <module>
main(process_argv(sys.argv))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 4060, in main
cmd_verify(args.gamedir, args.skipextras,args.skipids,check_md5, check_filesize, check_zips, args.delete,not args.noclean,args.ids, args.os, args.lang,args.skipgalaxy,args.skipstandalone,args.skipshared, args.skipfiles, args.forceverify,args.permissivechangeclear)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 3632, in cmd_verify
if itm.unreleased:
^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased

Does anybody know what could be the problem?

The command I try to write is "verify -skipextras"
Apologies I didn't see this. You've somehow got an item in your manifest without the unreleased attribute set. That shouldn't be possible for current items, but if you've brought in an old manifest and never done a full update this could happen. I'll add in appropriate error handling for this.
avatar
Modelsson: Greetings and a big thank you for this great script!

I used it on my WIN10 with no problem. Now on WIN1124H2 some problems have arisen.

I solved it with using python 2+ since 3+ gave me file writing errors.

Now the update and download, clean and trash commands work flawlessly, but the verify command is still giving me problems that I cannot solve and can't find the solution to on stackoverflow. This is what I get in my window:

20:01:34 | scanning manifest for renames...
20:01:34 | fatal...
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 4263, in <module>
main(process_argv(sys.argv))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 4060, in main
cmd_verify(args.gamedir, args.skipextras,args.skipids,check_md5, check_filesize, check_zips, args.delete,not args.noclean,args.ids, args.os, args.lang,args.skipgalaxy,args.skipstandalone,args.skipshared, args.skipfiles, args.forceverify,args.permissivechangeclear)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 3632, in cmd_verify
if itm.unreleased:
^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased

Does anybody know what could be the problem?

The command I try to write is "verify -skipextras"
avatar
Kalanyr: Apologies I didn't see this. You've somehow got an item in your manifest without the unreleased attribute set. That shouldn't be possible for current items, but if you've brought in an old manifest and never done a full update this could happen. I'll add in appropriate error handling for this.
No worries, friend. I actually did a whole new full update. The new script even suggested that an incompatible manifest was found and what to do with it. I pressed "discard" which I think means that it deleted the old one and made a new one. Then I saw the new functionality you implemented (the two *.bak files) and I knew it had to be working.

I'm doing a full update right now and will see if it will fix anything.

UPDATE:

While getting the manifest, some errors have come to light which I haven't noticed before:

17:07:23 | ( 93 / 457) fetching game details for dome_keeper...
17:07:23 | The handled exception was:
17:07:23 | error
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 2268, in cmd_update
handle_game_updates(gamesdb[item_idx], item,strict, strictDownloadsUpdate, strictExtrasUpdate)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 1085, in handle_game_updates
if (candidate.md5 != None and candidate.md5 == newExtra.md5 and candidate.size == newExtra.size) or ( newExtra.unreleased and candidate.unreleased ):
^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased
17:07:23 | End exception report.

And I got the same for: "dying_light_the_following_enhanced_edition", "metro_exodus" and "shadow_tactics_blades_of_the_shogun".

Seems that the manifest completes with errors but I am able to download nevertheless. But the verify command fails to start because of manifest errors.

Then I got this message also, but only for this game, even though my whole library is downloaded.

17:09:01 | (141 / 457) fetching game details for grim_dawn...
17:09:05 | -> setup_grim_dawn_-_forgotten_gods_1.2.1.5a_(79771).exe already exists in this game entry with same size/md5, skipping adding this file to the manifest
17:09:05 | -> setup_grim_dawn_-_forgotten_gods_1.2.1.5a_(79771)-1.bin already exists in this game entry with same size/md5, skipping adding this file to the manifest
avatar
Kalanyr: Apologies I didn't see this. You've somehow got an item in your manifest without the unreleased attribute set. That shouldn't be possible for current items, but if you've brought in an old manifest and never done a full update this could happen. I'll add in appropriate error handling for this.
avatar
Modelsson: No worries, friend. I actually did a whole new full update. The new script even suggested that an incompatible manifest was found and what to do with it. I pressed "discard" which I think means that it deleted the old one and made a new one. Then I saw the new functionality you implemented (the two *.bak files) and I knew it had to be working.

I'm doing a full update right now and will see if it will fix anything.

UPDATE:

While getting the manifest, some errors have come to light which I haven't noticed before:

17:07:23 | ( 93 / 457) fetching game details for dome_keeper...
17:07:23 | The handled exception was:
17:07:23 | error
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 2268, in cmd_update
handle_game_updates(gamesdb[item_idx], item,strict, strictDownloadsUpdate, strictExtrasUpdate)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 1085, in handle_game_updates
if (candidate.md5 != None and candidate.md5 == newExtra.md5 and candidate.size == newExtra.size) or ( newExtra.unreleased and candidate.unreleased ):
^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased
17:07:23 | End exception report.

And I got the same for: "dying_light_the_following_enhanced_edition", "metro_exodus" and "shadow_tactics_blades_of_the_shogun".

Seems that the manifest completes with errors but I am able to download nevertheless. But the verify command fails to start because of manifest errors.

Then I got this message also, but only for this game, even though my whole library is downloaded.

17:09:01 | (141 / 457) fetching game details for grim_dawn...
17:09:05 | -> setup_grim_dawn_-_forgotten_gods_1.2.1.5a_(79771).exe already exists in this game entry with same size/md5, skipping adding this file to the manifest
17:09:05 | -> setup_grim_dawn_-_forgotten_gods_1.2.1.5a_(79771)-1.bin already exists in this game entry with same size/md5, skipping adding this file to the manifest
Could you try this: https://www.dropbox.com/scl/fi/l718lkrotp5yqy2k9mqjw/gogrepoc.py?rlkey=jjbsn5erp1ub605mg4i02jym8&amp;dl=0 and let me know if it fixes the problem ? I don't understand how a new manifest can generate extras without that info, it's set by default when the AttrDict is generated

The second is normal, GOG sometimes includes multiple entries for the same file ( it's usually when they've included the same manual in both the base game and expansion for some reason or similar )
I ran the full update now. So far the same game(s) triggered a slightly different error:
21:01:59 | The handled exception was:
21:01:59 | error
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 973, in handle_game_updates
_ = candidate.unreleased
^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 2276, in cmd_update
handle_game_updates(gamesdb[item_idx], item,strict, strictDownloadsUpdate, strictExtrasUpdate)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 974, in handle_game_updates
except AttributeErrror:
^^^^^^^^^^^^^^^
NameError: name 'AttributeErrror' is not defined. Did you mean: 'AttributeError'?
21:01:59 | End exception report.
The same error again with "dying_light_the_following_enhanced_edition", "metro_exodus" and "shadow_tactics_blades_of_the_shogun". Only these 3 games are giving that error.

The verify command now works! With or without the "skipextras" :D
avatar
Modelsson: I ran the full update now. So far the same game(s) triggered a slightly different error:

21:01:59 | The handled exception was:
21:01:59 | error
Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 400, in __getattr__
return self[key]
~~~~^^^^^
KeyError: 'unreleased'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 973, in handle_game_updates
_ = candidate.unreleased
^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 402, in __getattr__
raise AttributeError(key)
AttributeError: unreleased

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "J:\GOG\gogrepo.py", line 2276, in cmd_update
handle_game_updates(gamesdb[item_idx], item,strict, strictDownloadsUpdate, strictExtrasUpdate)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\GOG\gogrepo.py", line 974, in handle_game_updates
except AttributeErrror:
^^^^^^^^^^^^^^^
NameError: name 'AttributeErrror' is not defined. Did you mean: 'AttributeError'?
21:01:59 | End exception report.
avatar
Modelsson: The same error again with "dying_light_the_following_enhanced_edition", "metro_exodus" and "shadow_tactics_blades_of_the_shogun". Only these 3 games are giving that error.

The verify command now works! With or without the "skipextras" :D
Argh, stupid typo. Should be fixed now. Could you redownload the linked file and try again please ?
avatar
Modelsson: I ran the full update now. So far the same game(s) triggered a slightly different error:

The same error again with "dying_light_the_following_enhanced_edition", "metro_exodus" and "shadow_tactics_blades_of_the_shogun". Only these 3 games are giving that error.

The verify command now works! With or without the "skipextras" :D
avatar
Kalanyr: Argh, stupid typo. Should be fixed now. Could you redownload the linked file and try again please ?
Ok, so the manifest completed without errors YAY!, but when downloading I got these errors, but it was to much code to paste here so I put it in a txt file:

https://www.dropbox.com/scl/fi/9bfjv5hqo3muokpb9d5hg/error-while-downloading.txt?rlkey=1caxujymjdbtc17xzrsop23ae&amp;st=3dacevym&amp;dl=0
Post edited April 18, 2025 by Modelsson
avatar
Kalanyr: Argh, stupid typo. Should be fixed now. Could you redownload the linked file and try again please ?
avatar
Modelsson: Ok, so the manifest completed without errors YAY!, but when downloading I got these errors, but it was to much code to paste here so I put it in a txt file:

https://www.dropbox.com/scl/fi/9bfjv5hqo3muokpb9d5hg/error-while-downloading.txt?rlkey=1caxujymjdbtc17xzrsop23ae&amp;st=3dacevym&amp;dl=0
As far as I can tell that indicates gogrepoc doesn't have permission to write to the folder it's in which is preventing it from writing log files or updating the manifest so that's weird, is it chmod appropriately if you're on Linux or is it in a folder protected by Ransomware Protection if you're on Windows ?
avatar
Modelsson: Ok, so the manifest completed without errors YAY!, but when downloading I got these errors, but it was to much code to paste here so I put it in a txt file:

https://www.dropbox.com/scl/fi/9bfjv5hqo3muokpb9d5hg/error-while-downloading.txt?rlkey=1caxujymjdbtc17xzrsop23ae&amp;st=3dacevym&amp;dl=0
avatar
Kalanyr: As far as I can tell that indicates gogrepoc doesn't have permission to write to the folder it's in which is preventing it from writing log files or updating the manifest so that's weird, is it chmod appropriately if you're on Linux or is it in a folder protected by Ransomware Protection if you're on Windows ?
I have that disabled in Win11, and I explicitly added permissions to my user account and full control to gogrepoc.py and the whole disk. Will add an exclusion to the whole folder in defender and test it out again. Will report back.
avatar
Modelsson: I explicitly added permissions to my user account and full control to gogrepoc.py and the whole disk.
Keep in mind that adding permissions wouldn't be enough, if there were things explicitly forbidden before. On NTFS the "prohibition list" has precedence over all allowances.

You can test this on the command line (as admin, so you're allowed to see everything) with "cacls.exe" / "icacls.exe" / "xcacls.exe" (depending on the Windows version or from the Resource Kits).
avatar
Modelsson: I explicitly added permissions to my user account and full control to gogrepoc.py and the whole disk.
avatar
ChFra: Keep in mind that adding permissions wouldn't be enough, if there were things explicitly forbidden before. On NTFS the "prohibition list" has precedence over all allowances.

You can test this on the command line (as admin, so you're allowed to see everything) with "cacls.exe" / "icacls.exe" / "xcacls.exe" (depending on the Windows version or from the Resource Kits).
This external drive I'm migrating to had some 200MB EFI partition on that I just removed. Now I've taken ownership of the System Volume Information with the help of the programs you just mentioned and I successfully deleted the folder.

Now there is only 1 partition on the whole disk and I'm the owner with full control as well as the system has full control like wise the gogrepoc.py.

I have been copying my backup through the night and now is the moment of truth. Gonna run the script.

Other than this, I don't have any idea what could I do. Maybe it's a faulty drive?
avatar
ChFra: Keep in mind that adding permissions wouldn't be enough, if there were things explicitly forbidden before. On NTFS the "prohibition list" has precedence over all allowances.

You can test this on the command line (as admin, so you're allowed to see everything) with "cacls.exe" / "icacls.exe" / "xcacls.exe" (depending on the Windows version or from the Resource Kits).
avatar
Modelsson: This external drive I'm migrating to had some 200MB EFI partition on that I just removed. Now I've taken ownership of the System Volume Information with the help of the programs you just mentioned and I successfully deleted the folder.

Now there is only 1 partition on the whole disk and I'm the owner with full control as well as the system has full control like wise the gogrepoc.py.

I have been copying my backup through the night and now is the moment of truth. Gonna run the script.

Other than this, I don't have any idea what could I do. Maybe it's a faulty drive?
You could try a small test with a known good folder on your main drive, just to make sure the script / python install is fine.
This happens while downloading, not even when finishing a download but during. So this is a logging error? Can you disable logging? Because I can't have anymore ownership of the drive and files as I already have :D

--- Logging error ---
Traceback (most recent call last):
File "g:\GOG\gogrepo.py", line 3202, in worker
File "g:\GOG\gogrepo.py", line 2994, in ioloop
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Modelsson\AppData\Local\Programs\Python\Python313\Lib\logging\__init__.py", line 1154, in emit
self.flush()
~~~~~~~~~~^^
File "C:\Users\Modelsson\AppData\Local\Programs\Python\Python313\Lib\logging\__init__.py", line 1136, in flush
self.stream.flush()
~~~~~~~~~~~~~~~~~^^
PermissionError: [Errno 13] Permission denied
Call stack:
File "C:\Users\Modelsson\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1012, in _bootstrap
self._bootstrap_inner()
File "C:\Users\Modelsson\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 1041, in _bootstrap_inner
self.run()
File "C:\Users\Modelsson\AppData\Local\Programs\Python\Python313\Lib\threading.py", line 992, in run
self._target(*self._args, **self._kwargs)
File "g:\GOG\gogrepo.py", line 3222, in worker
Message: 'The unhandled exception was:'
Arguments: ()

Here are some links when searching for the error. I can't make anything out of it. Can you? Just to point me in the right direction. I don't know what else to do... Is it a faulty drive?

why-am-i-getting-ioerror-errno-13-permission-denied
You should never need admin for PyInstaller
Fixing "PermissionError: [Errno 13] Permission denied"
Why am I experiencing Linux Python permission error errorno 13
Post edited April 19, 2025 by Modelsson
And if I intentionally install the latest 2+ Python I get this error:

15:34:38 | The unhandled exception was:
Traceback (most recent call last):
File "C:\Python27\lib\logging\__init__.py", line 892, in emit
self.flush()
File "C:\Python27\lib\logging\__init__.py", line 852, in flush
self.stream.flush()
IOError: [Errno 13] Permission denied
Logged from file gogrepo.py, line 3222
15:34:38 |
Traceback (most recent call last):
File "gogrepo.py", line 3202, in worker
File "gogrepo.py", line 2994, in ioloop
IOError: [Errno 13] Permission denied
Traceback (most recent call last):
File "C:\Python27\lib\logging\handlers.py", line 76, in emit
if self.shouldRollover(record):
File "C:\Python27\lib\logging\handlers.py", line 157, in shouldRollover
self.stream.seek(0, 2) #due to non-posix-compliant Windows feature
IOError: [Errno 13] Permission denied
Logged from file gogrepo.py, line 3223
15:34:39 | End exception report.

Is "due to non-posix-compliant Windows feature" connected to my Python 3 error?
You can disable logging with the -nolog parameter but I don't think that will help the earlier logs you posted showed it didn't have permission to write to the manifest either, and that's kinda important since that's where we store all the data from update before we download.

One of those things you posted suggested that you can get this error in unexpected situations since it doesn't seem to strictly be a permission error, what directory is gogrepoc.py in ? And the directory doesn't have any weird files / folders in it ? ( eg no folders name gogrepo.log or anything similar ). Also the disk isn't full is it ?

ETA2 - No the non-posix thing shouldn't matter, that's a work around for Windows not behaving as it would if it was Posix compliant , so if you're seeing that you're already on the correct branch. You're not using a special driver to mount a Linux file system on Windows are you ? I guess it might do weird stuff if you're trying to mount a ext4 or btrfs or xfs filesystem on Windows.
Post edited April 20, 2025 by Kalanyr