Azure-Samples / chat-with-your-data-solution-accelerator

A Solution Accelerator for the RAG pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences. This includes most common requirements and best practices.
https://azure.microsoft.com/products/search
MIT License
638 stars 313 forks source link

Local Debug Failing - Can't find Streamlit or Flask Modules #699

Closed cmw2 closed 2 months ago

cmw2 commented 2 months ago

Describe the bug

Using the VS Code debug options to launch the app components is failing. When launching the Admin site get message: "No module named streamlit". When launching Frontend (api) get message: "No module named flask"

Expected behavior

Expect the launch commands to work and be in debug mode in VS Code.

How does this bug make you feel?

Share a gif from giphy to tells us how you'd feel


Debugging information

Steps to reproduce

Steps to reproduce the behavior:

  1. Clone code into WSL (I'm on windows machine)
  2. Open via "code ." in WSL
  3. Reopen in container
  4. azd auth / up (and 2nd deploy of azd deploy adminweb as discussed in another issue to get it working)
  5. Go to debug tab in vscode, and try "Launch Admin Site". Also try "Launch Frontend (api). (Launch Frontend (UI) works but it fails since the api isn't running.)

Screenshots

If applicable, add screenshots to help explain your problem.

image

Logs

If applicable, add logs to help the engineer debug the problem.


Tasks

To be filled in by the engineer picking up the issue

ross-p-smith commented 2 months ago

Hi Chris, I have actually seen this before. I don't suppose you used that button "Open in DevContainers" in the Local Setup instructions? I think that does something weird for Windows machines. I think I need to update those instructions if you did!

Happy to share screen at some point if you like

cmw2 commented 2 months ago

Actually, no I didn't use that link in the docs. I did the steps as you mentioned using WSL.

cecheta commented 2 months ago

Hi @cmw2, could you try the following:

cmw2 commented 2 months ago

That was it. I should have caught that, doh!