anvil.tables.TableError: This table cannot be written or searched by this app #2

What I’m trying to do:
I used Anvil simple login form and it worked once and now its giving me this error once I enter my login information. Its like the data table is not there.

# User Logins
    anvil.users.login_with_form()
    self.label_userName.text = anvil.users.get_user()['email']

anvil.tables.TableError: This table cannot be written or searched by this app

Learn more about Data tables

  • <running on the server>
  • called from anvil-services/anvil/users/__init__.py:38
  • called from anvil-services/anvil/users/__init__.py:606
  • called from anvil-services/anvil/users/__init__.py:606
  • called from anvil-services/anvil/users/__init__.py:606
  • called from Home, line 18

What I’ve tried and what’s not working:

I need help… this doesn’t make any sense. I built another app and its exactly what i wrote and that app works fine.

Clone link:
share a copy of your app

It smells like the app is trying to use a table that doesn’t exist in the app database.

Are you using a dependency that accesses a table without adding that table to the main app database?

I am trying to use the table that comes standard with anvil.users.get_user(). Why did it delete? How do i bring it back?

If you accidentally deleted the users table, you should be able to create a new temporary app and add the user service, which will create a new users table.

Then go to your app, add the existing table and select the users table just created in the other app.

Then you may need to go to the user service and select that table, so it’s linked to the user service (I don’t know if this will be automatic or not).

2 Likes