[Python 3.10 Beta] App Error only in public version

I have an app that runs perfectly in Debug-Mode but when I access it over the published url I get an

This app has experienced an error
AnvilWrappedError: Internal server error: 9857569301b8

The Log shows:

AnvilWrappedError: Internal server error: 2cd0424400c3
at ListUploads, line 15

In this line there is a simple call to the backend:

 self.uploadlist.items = anvil.server.call('getUploads')

The Backend-Code

@anvil.server.callable
def getUploads():
  return app_tables.uploads.search(tables.order_by('time',ascending=False))

“uploads” is a table with some uploaded files. From the Permission side: Forms are allowed to view this table

Is the debug version using the same data table?

1 Like

Is the debug version using the same data table?

Yes, everything is the same.

I would not know how to set different data tables für public and debug version.

Maybe imprtant: I use Python3.10(Beta) with a custom modul (python-slugify)

1 Like

Sounds like a potential Anvil bug to me. Is it something you can share a clone link to? (Only do so if you’re OK with the data tables and everything being public.)

p.s. Welcome to the forum!

Sounds like a potential Anvil bug to me.

It’s very likely a problem with the Python3.10 beta (maybe in addition with the custom module from pypy).

I fixed it by switching to the “Full python 3” Version and adding the main file of the source code of python-slugify as a backend package.

Unfortunately I can’t make the app public - maybe this information is helpful for further investigation.

p.s. Welcome to the forum!

thanks :wink:
appreciate the fast response

2 Likes

Hi @sven,

Sorry about that – that error message should be nicer, at least! I think this will work if you migrate your app to Environments. (It’s working in dev mode because that’s secretly an Environment under the hood :wink: ) Can you try it and let us know if that fixes things?

1 Like

Thanks for your answer

if you migrate your app to Environments

I don’t know how to do this or if I’m able to. Is “Publish” (1), “Add Environment” (2)

the right way?

Than I need to upgrade, correct?

1 Like

Just an idea while waiting for the definitive answer from @meredydd, but what if you instead click on the circled link in the bottom left?

Unfortunately I can’t do this.

I tried this with another app and after the conversion to environments, the published URL was no longer valid. But I had already gave the public link to a customer, so I need to stick with it.

1 Like

Does this help?
Choosing a URL

Yes, I added a table in the other app and connected in the backend (as in the original app) and everything works fine.

2 Likes