Nuitka/Nuitka

wirerope and methodtools cause nuitka binary to fail.

Open

#3,145 opened on Oct 12, 2024

View on GitHub
 (5 comments) (0 reactions) (1 assignee)Python (565 forks)batch import
bugexcellent_reporthelp wanted

Repository metrics

Stars
 (10,351 stars)
PR merge metrics
 (Avg merge 5d 12h) (6 merged PRs in 30d)

Description

python -m nuitka --version output:  1 ✘ 2.4 Commercial: None Python: 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805] Flavor: Unknown Executable: /usr/bin/python OS: Linux Arch: x86_64 Distribution: Manjaro (based on arch) None Version C compiler: /usr/bin/gcc (gcc 14.2.1).

~/Downloads/RevEDA/reveda.dist /reveda.bin  ✔ Traceback (most recent call last): File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/reveda.py", line 38, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/gui/revedaMain.py", line 43, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/backend/importViews.py", line 35, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/gui/libraryBrowser.py", line 46, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/gui/symbolEditor.py", line 42, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/gui/symbolScene.py", line 60, in File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/fileio/loadJSON.py", line 392, in File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/revedaEditor/fileio/loadJSON.py", line 402, in PCellCache File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/wirerope/rope.py", line 158, in call File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/wirerope/callable.py", line 109, in init File "/home/eskiyerli/Downloads/RevEDA/reveda.dist/wirerope/callable.py", line 49, in detect_function_attr_name TypeError: function() missing required argument 'globals' (pos 2)

Offending code is:

@classmethod
@lru_cache(maxsize=100)
def getPCellDef(cls, file_path: str) -> dict:
    try:
        with open(file_path, "r") as temp:
            return json.load(temp)
    except (json.JSONDecodeError, FileNotFoundError):
        return {}

I have seen a similar issue report from 2020 but that was closed because the python and nuitka versions were very old. In this case, they are fairly recent. In this case, the versions are the latest: Python 3.12 methodtools 0.4.5 wirerope 0.4.5 Nuitka 2.4

Contributor guide