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
NotADirectoryError: [Errno 20] Not a directory #477
Comments
Use BTW. Is "playwright" the PyPI package of the same name? If it is I can add a recipe to py2app that will do this automaticly. |
Thanks for your replying. Yes, it's the same name. After I use
|
I get one step further with these options: OPTIONS={
"packages": ["playwright"],
"excludes": ["playwright._impl.__pyinstaller.hook-playwright.sync_api", "playwright._impl.__pyinstaller.hook-playwright.async_api"]
} That does not result in a completely working app bundle though: playwright complains it cannot locate the browser engine. Playwright outside of the app bundle installs those in a folder in ~/Library/Caches, but bundled in an app it looks for the inside the playwright package itself. It might be possible to work around this problem manually by copying the browser engines manually after running pyapp, e.g. copy the contents of It seems that the playwright package has some assumptions about its runtime environment that aren't try in a bundles application. That's usually something that I can fix with a recipe in py2app, but researching that takes some time, and I don't have the time to do that research today. To be continued... |
After executing
python setup.py py2app
, when I run ./dist/main.app/Contents/MacOS/main, I got this error :NotADirectoryError: [Errno 20] Not a directory: '/Users/wj/myproject/client/dist/main.app/Contents/Resources/lib/python39.zip/playwright/driver/playwright.sh'
python39.zip is a compressed file, I find a related log in the build output:
copying file build/bdist.macosx-10.9-x86_64/python3.9-standalone/app/python39.zip -> /Users/wj/myproject/client/dist/main.app/Contents/Resources/lib
It's running normally if I got the app file by
python setup.py py2app -A
.system version: macOS Monterey 12.6
python: 3.9
py2app: 0.28.4
setup.py:
The text was updated successfully, but these errors were encountered: