Replies: 3 comments 3 replies
-
Further investigation into the In an attempt to bypass this problem, I manually updated the However, manually adjusting Would greatly appreciate any advice, insights, or best practices on addressing this issue fundamentally. Thank you for your support! Update startup module code:from anvil import *
from anvil.js.window import history, location
# Update history.state before the first import of anvil_extras.routing
if history.state is not None or "url" not in history.state:
state = {"url": location.hash, "pos": 0}
history.replaceState(state, "", state["url"])
from anvil_extras import routing
from . import shared_import
from .globals import GLOBALS
def catch_hash():
url_hash = anvil.get_url_hash()
if GLOBALS.IN_DEBUG:
routing.set_url_hash(
url_pattern="contact-us",
url_dict=None,
replace_current_url=True,
)
routing.launch()
if __name__ == "__main__":
catch_hash() |
Beta Was this translation helpful? Give feedback.
-
Stu, thank you for your timely response. Following your suggestion, I ran the app in incognito mode and observed a slightly different behavior as anticipated. Specifically, This variance in behavior between standard and incognito modes is intriguing and seems to hint at underlying issues with how Please keep me updated on any progress or patches related to this issue. I'm eager to streamline my code by removing the workaround once a permanent fix is in place. Again, thank you for your assistance and looking forward to any updates. |
Beta Was this translation helpful? Give feedback.
-
This error suddenly popped up today in all our Anvil applications that use I did notice that this error started occurring right before v2.7.0 was released. Is there any way that the occurrence of this error has anything to do with this version bump? I wouldn't know how, but it just seemed like an intriguing coincidence. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I've encountered a
LookupError: url
with an Anvil app that was functioning correctly before I went on vacation. The app leverages the Anvil Extras routing library to manage URL routing based on the hash URL, primarily during the startup process. Although the app is still under development, and I'm currently focusing on testing specific pages rather than the full routing logic, this error has started to appear unexpectedly.Context:
Startup Module Code Snippet:
Error Message:
Attempts to Resolve:
shared_imports
.shared_imports
.Despite these attempts, the error persists. I'm seeking guidance on troubleshooting this issue further, particularly any insights into the
LookupError: url
with the Anvil Extras routing library in this context. Any advice or suggestions would be greatly appreciated.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions