Python Forum
jira-2.0.0.dist causing error with py2exe
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
jira-2.0.0.dist causing error with py2exe
#1
We use py2exe to generate an executable for one of our tools. This worked perfectly for x number of years on Python 3.4 until i added a feature that required a JIRA module.

pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org JIRA
Then in the code:

from jira.client import JIRA


Now when i try to generate an exe from the code:

    from distutils.core import setup
    import py2exe
    import sys
    sys.setrecursionlimit(10000)
    setup(
      windows=[{
            "script":"myscript.py",
            "icon_resources": [(1, "icon.ico")],
            "dest_base":"myscript"            
              }],
      options={"py2exe":{"includes":["sip","sys","decimal"],"bundle_files": 1}}) 
It fails with:

Error:
running py2exe Traceback (most recent call last): File "mysetup.py", line 13, in <module> options={"py2exe":{"includes":["sip","sys","decimal"],"bundle_files": 1}}) File "C:\Python34\lib\distutils\core.py", line 149, in setup dist.run_commands() File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\Python34\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Python34\lib\site-packages\py2exe\distutils_buildexe.py", line 188, in run self._run() File "C:\Python34\lib\site-packages\py2exe\distutils_buildexe.py", line 267, in _rubuilder.analyze() File "C:\Python34\lib\site-packages\py2exe\runtime.py", line 173, in analyze target.analyze(mf) File "C:\Python34\lib\site-packages\py2exe\runtime.py", line 74, in analyze modulefinder.run_script(self.script) File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 86, in run_script self._scan_code(mod.__code__, mod) File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 401, in _scan_code self._scan_code(c, mod) File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 401, in _scan_code self._scan_code(c, mod) File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 394, in _scan_code self.safe_import_hook(name, mod, fromlist, level) 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 288, in _find_and_load self._gcd_import(parent) 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 357, in _find_and_load self._scan_code(module.__code__, module) File "C:\Python34\lib\site-packages\py2exe\mf3.py", line 394, in _scan_code self.safe_import_hook(name, mod, fromlist, level) 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 288, in _find_and_load self._gcd_import(parent) 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)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 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) RuntimeError: maximum recursion depth exceeded
When i uninstall the JIRA module the error goes away. We'd still like to use Py2exe.
Reply
#2
There are known issues here. I direct you to the solution:
https://stackoverflow.com/questions/2921...ith-py2exe
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Jira Connectivity Shyam 1 254 Apr-17-2024, 08:55 AM
Last Post: Abhishikt
Photo exe created by pyinstaller only works in the dist directory dee 7 2,778 Feb-23-2023, 05:53 PM
Last Post: dee
  [split] Py2exe Writing UNKNOWN-0.0.0-py3.7.egg-info sarahroxon7 1 929 Apr-20-2022, 08:02 AM
Last Post: VadimCr
  string.format() suddenly causing errors with google drive API zwitrader 0 1,754 Jun-28-2021, 11:38 PM
Last Post: zwitrader
  Py2exe and pycryptodome reks2004 5 4,174 Dec-16-2020, 06:42 PM
Last Post: reks2004
  Empty response to request causing .json() to error t4keheart 1 10,039 Jun-26-2020, 08:35 PM
Last Post: bowlofred
  Py2exe Writing UNKNOWN-0.0.0-py3.7.egg-info Rickus 2 3,658 Feb-18-2020, 03:09 PM
Last Post: Rickus
  Appending to list not working and causing a infinite loop eiger23 8 3,981 Oct-10-2019, 03:41 PM
Last Post: eiger23
  sys.path miss dist-packages in a virtual env. chomwitt 2 2,567 May-23-2019, 08:08 PM
Last Post: chomwitt
  json.load causing IndexError: list index out of range WallyZ 5 6,201 May-20-2019, 01:11 PM
Last Post: WallyZ

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020