Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'imp' #219

Open
esseti opened this issue Dec 12, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'imp' #219

esseti opened this issue Dec 12, 2024 · 2 comments

Comments

@esseti
Copy link

esseti commented Dec 12, 2024

I've a piece of code that relies on rumps and it's built with app2py
https://github.com/esseti/vince

since i've changed the mac, now when building i discovered that the app does not start anymore, with this error.
while if i run the code directly it works

do you have any clue why this is happening?

i use python-3.11

/Users/stefano/sw/vince/src/dist/Vince2.app/Contents/Resources/__boot__.py:116: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
  File "/Users/stefano/sw/vince/src/dist/Vince2.app/Contents/Resources/__boot__.py", line 161, in <module>
    _run()
  File "/Users/stefano/sw/vince/src/dist/Vince2.app/Contents/Resources/__boot__.py", line 84, in _run
    exec(compile(source, path, "exec"), globals(), globals())
  File "/Users/stefano/sw/vince/src/dist/Vince2.app/Contents/Resources/vince.py", line 2, in <module>
    import rumps
  File "rumps/__init__.pyc", line 25, in <module>
  File "rumps/notifications.pyc", line 14, in <module>
  File "Foundation/__init__.pyc", line 203, in <module>
  File "Foundation/__init__.pyc", line 12, in _setup
  File "CoreFoundation/__init__.pyc", line 37, in <module>
  File "CoreFoundation/__init__.pyc", line 12, in _setup
  File "objc/__init__.pyc", line 7, in <module>
  File "objc/_objc.pyc", line 13, in <module>
  File "objc/_objc.pyc", line 2, in __load
ModuleNotFoundError: No module named 'imp'
@brunns
Copy link

brunns commented Dec 13, 2024

I'm assuming you mean py2app. What command are you using to build your app? I've sometimes needed to use the --packages option to include something that py2app hasn't picked up.

@esseti
Copy link
Author

esseti commented Dec 13, 2024

You are right that works (I used --include)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants