Stlite: unable to mount local filesystem on Windows

I’m trying to create an executable using stlite. I need the app to read and write files on the local filesystem, so I followed these explanations. Even with the example provided here, I always get an error like this:

Error during boot up

Only URLs with a scheme in: file, data, node, and electron are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

A popup also shows the trace (sorry for the screenshot, the popup doesn’t let me select the text):

Screenshot 2024-06-11 160218

requirements file).

I thought that this had to do with the way the path is specified in package.json:

       "nodefsMountpoints": {
          "/mnt": "."
        }

so I tried a few variants, with file:///c:/... but it always ended with the same error.

Python 3.8.10
Streamlit 1.35.0
stlite 0.58.1

Any suggestion welcome, thanks!

Hi @Erwan

There are relevant resources that covers this topic on creating an exe of a Streamlit app:

Hope this helps!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.