How to include state files in python build?

Connected Tutorial
This question is a follow-up to this tutorial:

I need to include both python and static files in my site. I’ve added a static component as well a python one but am getting errors “! Directory /workspace/static does not exist” for the output dir. What is the output dir? Should I have created it and if so how? Or is this an internal bug?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Ok, so it looks like I may have fixed this. What I did was delete the static component. I then changed the request route of the python component so that it wasn’t just ‘/’ and added a new folder to the repo to keep static files in and added an ‘index.html’ file. The site now serves both python and static files. It’s difficult to know what fixed the issue but my best guess is that the static component expects there to be an ‘index.html’ file and if it doesn’t find one it gives errors