Batch export coded value domains to table

I've attempted to write a script that will export all the coded value domains in a geodatabase to a table. Before I dig in the to script and what's wrong, I have looked at the similar question on this topic, but that script would not run for me. Here is my code:

It also produces the first table from the domain, but does not copy the coded values and creates an empty table. I've looked through the help documents for Domain to Table (Data Management) and List Domains, but I cannot figure out why it's throwing an error. Clearly something is off in the Domain to Table function, but I can't figure out what, especially since it prints all the parameters correctly. I would greatly appreciate any suggestions. Thank you for your time.

It's also the same inside ArcMap. When the code is run in ArcMaps Python window, you can check the Geoprocessing:Results window for info. By right clicking on the Domain To Table line and coping it as a Python snippet to notepad, you can see the parameters being used, even when the tool fails.

It's also the same inside ArcMap. When the code is run in ArcMaps Python window, you can check the Geoprocessing:Results window for info. By right clicking on the Domain To Table line and coping it as a Python snippet to notepad, you can see the parameters being used, even when the tool fails.