You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of coconut's current header contains a check for a __init__.py file in the executed python file's directory. That check uses os.listdir which cannot operate within a zippapp. It is a known issue for zippapps to not be able to read files and directories like you could if you simply execute a python script, or a directory (using __main__.py). Tools like https://github.com/linkedin/shiv seem to circumvent this by extracting the zipapp before execution.
I'm not sure this is easily fixable, but since I just racked my brain for an hour wondering why this suddenly stopped working compared to older coconut versions, maybe a warning could be added to the docs or faq? :)
The text was updated successfully, but these errors were encountered:
After a few quick tests, this indeed seems to be working, at the cost of tripling the resulting build's size. But I think can live with that for now :)
Part of coconut's current header contains a check for a
__init__.py
file in the executed python file's directory. That check usesos.listdir
which cannot operate within a zippapp. It is a known issue for zippapps to not be able to read files and directories like you could if you simply execute a python script, or a directory (using__main__.py
). Tools like https://github.com/linkedin/shiv seem to circumvent this by extracting the zipapp before execution.I'm not sure this is easily fixable, but since I just racked my brain for an hour wondering why this suddenly stopped working compared to older coconut versions, maybe a warning could be added to the docs or faq? :)
The text was updated successfully, but these errors were encountered: