I'm attempting to compile a script to an executable file using py2exe and having the following issue whenever I try and import modules from the Google API client.
Specifically the line from googleapiclient import discovery
When I attempt to compile I get the below error (trimmed):
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 120, in import_hook
module = self._gcd_import(name)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 274, in _gcd_import
return self._find_and_load(name)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 298, in _find_and_load
getattr(parent_module, name.rpartition('.')[2])
File "C:\Python34\lib\site-packages\py2exe\hooks.py", line 291, in __getattr__
self.__finder.safe_import_hook(renamed, caller=self)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 138, in safe_import_hook
self.import_hook(name, caller, fromlist, level)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 120, in import_hook
module = self._gcd_import(name)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 274, in _gcd_import
return self._find_and_load(name)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 298, in _find_and_load
getattr(parent_module, name.rpartition('.')[2])
File "C:\Python34\lib\site-packages\py2exe\hooks.py", line 291, in __getattr__
self.__finder.safe_import_hook(renamed, caller=self)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 135, in safe_import_hook
self._info(name, caller, fromlist, level)
File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 150, in _info
if self._verbose == 0:
RuntimeError: maximum recursion depth exceeded in comparison
The script runs fine under normal conditions I just can't seem to get it to compile to an EXE.