I’ve been working on a simple app to reformat user uploaded images. The app was working perfectly around mid-day on Friday, but without me changing anything, it now tosses an error. I have tried restoring prior working iterations of the app, and they now toss the same error as well. I had tested these prior versions from a variety of browsers and devices, all with perfect functionality. But now, none of them work on any device. For whatever reason, this code used to work, and now does not.
This is the error that I am getting:
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/tmp']
It occurs when trying to call to a server function, and the error occurs at the following line:
with anvil.media.TempFile(file) as filename:
img=cv.imread(filename)
Now, I am working off of the free account, so both client and server are running basic Python3, and have been since I began building this app. I’ve found a post with a very similar issue on the forum already (link below), but I want to stress that I was able to write files before using basic Python3. The app was working perfectly. I understand it probably shouldn’t have been working, given the info in the related forum post, but it was!
Related Forum Post: Cannot access server module '/tmp' directory - #6 by drummer687
Any help is appreciated. If there is a better way to create/send files between client and server, that would work too! Or if I could create an anvil media file directly from an array of pixel values, that would work I think! I am very new to this, so any constructive criticism is welcome and appreciated.
Clone Link:
https://anvil.works/build#clone:QGS7JLOU6MAQP4AP=PC6REWCCXRBAUWXEX5LKPPOU