I am trying to create a multi-page app with Dash, but I keep getting the error:
UnboundLocalError: local variable 'layout' referenced before assignment
I have followed the instructions on the Multi-Page Apps page, but I am still receiving the error. I have my pages in a designated pages folder, I have dash.register_page(__name__)
at the top of each page, and I followed the exact app.py code that was shown on the instruction page, but for some reason I am still getting that error.
The only things I can think of that may be interfering are that I’m doing all of this in my AWS EC2 instance, and I’m connecting to an S3 bucket using boto3.
Anybody have anything I can try? Already attempted to debug using AI, but nothing has worked so far.