Skip to content

Does anyone know how to fix a "(no such file), '/System/Library/Carbon.framework/Carbon' (no such file, not in dyld cache)" error? #208

@Dima-369

Description

@Dima-369

This happens on a M1 macOS 14.0.

test.py

import rumps


class BarApp(rumps.App):
    @rumps.clicked("Test")
    def test(self, _):
        rumps.alert("Now click BarApp twice, then click OK.\nResult: segfault")

       
BarApp("BarApp").run()

setup.py

from setuptools import setup

APP = ['test.py']
DATA_FILES = []
OPTIONS = {
    'argv_emulation': True,
    'plist': {
        'LSUIElement': True,
    },
    'packages': ['rumps'],
}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

The error

~/rumps test/dist/test.app/Contents/MacOS $ ./test

Traceback (most recent call last):
  File "/Users/dima/rumps test/dist/test.app/Contents/Resources/__boot__.py", line 321, in <module>
    _argv_emulation()
  File "/Users/dima/rumps test/dist/test.app/Contents/Resources/__boot__.py", line 318, in _argv_emulation
    _run_argvemulator()
  File "/Users/dima/rumps test/dist/test.app/Contents/Resources/__boot__.py", line 127, in _run_argvemulator
    carbon = _ctypes_setup()
             ^^^^^^^^^^^^^^^
  File "/Users/dima/rumps test/dist/test.app/Contents/Resources/__boot__.py", line 51, in _ctypes_setup
    carbon = ctypes.CDLL("/System/Library/Carbon.framework/Carbon")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "ctypes/__init__.pyc", line 376, in __init__
OSError: dlopen(/System/Library/Carbon.framework/Carbon, 0x0006): tried: '/System/Library/Carbon.framework/Carbon' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Carbon.framework/Carbon' (no such file), '/System/Library/Carbon.framework/Carbon' (no such file, not in dyld cache)
2023-10-11 21:16:10.885 test[81802:3058374] Launch error
2023-10-11 21:16:10.885 test[81802:3058374] Launch error
See the py2app website for debugging launch issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions