For some reason when testing a very basic new app with custom html and I start run I get this. Anyone know what this stems from? I was just trying to go by what the docs had with testing a custom html setup I have to make my main site a lot better looking.
Each time I try to run the app though I get:
ImportError: No module named Homepage
Wasn’t sure if I’m missing something here?
This may be a result of a recent change Anvil made to how Forms work as they can now be hierarchical.
Please see these docs to see if they can help you out.
I would say in general that the autocomplete should help with how to import modules properly.
yea but where or what is this Homepage part? That is what I’m unclear is what it is expecting or should be there.
I mean the base setup is pretty generic it just creates a form:
from ._anvil_designer import Form1Template
from anvil import *
class Form1(Form1Template):
def __init__(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
# Any code you write here will run when the form opens.
So am I missing something with this? I looked at those docs and get how that works but still not sure what this homepage is or what I should be putting here. I guess part of this is cause I still haven’t spent time looking over all this new package stuff since that didn’t exist when I wrote all this code a year ago.
I’m dealing with the nightmare that is now trying to figure out how to organize all this without breaking my entire app but that is a different story lol.
Are you able to clone the app so I can take a look?
Aha! This is a replication of a bug we’ve been looking for for ages! Please can you post (or PM) a clone link?
(In any case, the answer is that Anvil is confused about your startup module/form, and is trying to start with a nonexistent one called “Homepage”. If refreshing the Anvil editor doesn’t fix it, you can reset it by setting something else to the startup form and then setting the startup back to Form1. But if you can, please wait until we’ve cloned it first, to see what’s broken in the app settings!)
1 Like
Build a new custom HTML app you will see it :), see the below clone as well but I didn’t do anything really different.
Here if it helps but I didn’t do anything crazy, literally created a new custom HTML app and boom broke.
https://anvil.works/build#clone:ISE7VUXBDNITHF2T=44VZC2JJGIML3PQR4HGNB2FP
This is just some bs code I put in was working through some CSS issues and such to make it look right but you get the idea.
I can reproduce it over and over if you want to see it on a zoom, etc sometime just let me know. I already have some questions for you guys before I go live in a week or so on things anyways. 
Thanks for the clone link! That’s certainly broken, but I can’t reproduce it myself! Can you screen-record yourself creating a broken app? My guess is that we’re doing something subtle differently…
Yea might be a few days trying to get a few things done to try and get this beta launched this weekend.
@meredydd I can’t get it to do it now so I’ll keep trying and let you know.
Thanks
Has this ever been fixed?
I pretty much ran into the same problem.
When running unit tests on PyCharm, it traces back to the form template and from ._anvil_designer import StoreTemplate
Hello and welcome,
Can you screen-record yourself creating the broken app so that it will help devs detect the issue? According to the above conversation, the bug appears to still be outstanding.