Avaiga / taipy-doc

Holds the documentation set for Taipy, not including the code documentation obviously.
https://docs.taipy.io/
Apache License 2.0
12 stars 12 forks source link

BUG-If I configure the base_url in gui.run, and I will get the blank website in web browser. #840

Open LiuYuWei opened 6 months ago

LiuYuWei commented 6 months ago

Description A complete and clear description of the problem. If I configure the base_url in gui.run, and I will get the blank website in web browser.

How to reproduce

if name == "main": df_selection, sales_by_product_line, sales_by_hour = filter( city, customer_type, gender ) Gui(page).run(margin="0em", title="Sales Dashboard", base_url="/taipy/")



**Expected behavior**
Description of what would be the expected outcome.

I can see the dashboard in http://localhost:5000/taipy/

**Screenshots**
When available and relevant, screenshots to better highlight the problem.

None

**Runtime environment**
Please specify relevant indications.
 - Taipy version (or branch name): 

 v3.0.0

- OS: [e.g. Linux, Windows] and version 

docker: https://docs.taipy.io/en/develop/manuals/run-deploy/deploy/docker/development/

 - Browser: [e.g. Chrome, Edge, Safari] and version (if relevant)

Chrome

and any other relevant information.

**Acceptance Criteria**
- [ ] Ensure new code is unit tested, and check code coverage is at least 90%
- [ ] Create related issue in taipy-doc for documentation and Release Notes if relevant
FlorianJacta commented 6 months ago

This code is not working as well locally.

from taipy.gui import Gui

Gui("# Taipy App").run(base_url="/taipy")
LiuYuWei commented 6 months ago

Is anyone know that how to fix the error?

FlorianJacta commented 6 months ago

The base_url is to be used when working with a proxy. The base_url is basically for deployment usage only and not locally.

It is a way to let Taipy know if the base path is hosted on a different base route. What is your use case for using base_url?

LiuYuWei commented 5 months ago

Hi @FlorianJacta

We can put the application into our platform app store and the user can create the app by themselves. Our app service needs to use url prefix for each unique app pod. If the environment variable needs other method to combine together, then I think I cannot put into our service platform. Do you have method without proxy? Thanks!

FlorianJacta commented 5 months ago

If the requirement is for a local setup for a single application, modifying the page name could suffice:

prefix_url = "prefix/"
pages = {
    prefix_url + 'page_1': page_1,
    prefix_url + 'page_2': page_2
}

Gui(pages=pages).run()

This approach allows for simple redirection within the local context of a single Taipy application. However, when involving multiple Taipy applications, a more robust proxy solution is necessary. We can help you on that.

jrobinAV commented 5 months ago

We need to add some documentation on that.

github-actions[bot] commented 1 month ago

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

github-actions[bot] commented 1 month ago

This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.

github-actions[bot] commented 3 days ago

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.