NameError: cannot access free variable 'gettingEntity' where it is not associated with a value in enclosing scope

19 views
Skip to first unread message

Harry Doyle

unread,
May 22, 2026, 11:04:11 AMMay 22
to GAM for Google Workspace
Hi Group,

I'm hoping somebody can help with an error I'm getting when running a specific GAM command. I'm running a command to dump all files in a specific G drive for a user into a local CSV file, as follows (sensitive info anonymised):

gam config auto_batch_min 1 redirect csv ./filename.csv multiprocess user first...@mydomain.com print filelist select "143287498236fsd" fields id,title,permissions,owners,mimetype

The command runs, but after a minute or two it dies with the following error message:

  File "gam/__init__.py", line 82224, in ProcessGAMCommand
  File "gam/__init__.py", line 60191, in printFileList
  File "gam/__init__.py", line 59789, in _printChildDriveFolderContents
  File "gam/__init__.py", line 59789, in _printChildDriveFolderContents
  File "gam/__init__.py", line 59789, in _printChildDriveFolderContents
  [Previous line repeated 1 more time]
  File "gam/__init__.py", line 59787, in _printChildDriveFolderContents
  File "gam/__init__.py", line 59664, in _printFileInfo
NameError: cannot access free variable 'gettingEntity' where it is not associated with a value in enclosing scope

I've run this command with no problem on gamadv on Windows 11. I'm now trying to run it on Ubuntu 26.04, GAM version 7.43.04

Does anybody know what I'm doing wrong here? I know Python, so I know what the error message means, but I don't know what underlying issue is throwing the error. I can only guess it's related to the folder tree it's traversing...?

I should also add that it does sometimes work if I add a "depth" parameter so it's looking at less files, which seems to support my theory above.

Thanks for any help!

Harry

Ross Scroggs

unread,
May 22, 2026, 1:34:10 PMMay 22
to google-ap...@googlegroups.com
This in fixed in 7.43.09

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/cb45ef3d-ceb4-4555-bae9-2427e0410f62n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages