Open a newly created form. The form was created after converting the project to use environments (I had to to activate the uplink). All existing code seems to run fine.
What I’ve tried and what’s not working:
open_form("ssstel2")
returns the following error :
NameError: name 'ssstel2Template' is not defined
and the line number for the error is the class definition line below. Anvil creates that template itself so I don’t quite know what to do about this?
Code Sample:
from anvil import *
import anvil.server
import anvil.users
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
class ssstel2(ssstel2Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
UPDATE - this now occurs with any new form that I add (ie I can’t add any more forms to the project).
UPDATE 2 - trying to switch back to the classic editor to see if that helps, and it just sits there with a blue spinner, eventually giving me this :
We’re sorry, but an error occurred while loading Anvil. If this keeps happening, please contact support@anvil.works.
UPDATE 3 - I’ve had this before but I don’t know how it was fixed by Anvil :
Clone link:
I can’t, it contains confidential data.
Did this project ever get formally converted to use packages? Can you go back to the editor and do that?
(If you didn’t convert it to use packages, but opened it in the beta editor and added forms inside packages anyway, then it’s possible that Strange Things could happen…)
No. This is a very old project that works so well I leave it alone normally. I only reluctantly did the conversion because I had to enable the uplink.
What would you recommend I do now I’m in this half way state? By that I mean the old forms work but do not have that import added to them, but newly created forms (which don’t get that line added automatically) don’t work without it.