ExternalError: todo; haven't implemented non-read opens

I am trying to use open in write mode on the client side (ie with open(file_name, 'w') as f: some code), and receiving the error:

ExternalError: todo; haven’t implemented non-read opens

Am I right in interpreting this error to mean that it is currently only possible to use open in read-only mode, but that Anvil are intending to implement write mode functionality?

If this is the case, is it possible to have an indication of timeline for this implementation?

Thanks,
Amy

What do you need the open for?

The browser is never going to be able to create a file on your filesystem. You can, after asking for explicit user permission, download a media object as a file, but you can’t open a file from code.

If you need to store something on the client side, you could try with this: Storage — Anvil Extras documentation

3 Likes

Thanks for the link.

I was just trying to temporarily store something on the client side, not thinking what ‘creating a file’ would really mean and it looks like this is a much better way to do it!

1 Like