Avaiga / taipy-studio-config

Visual Studio Code extension for Taipy: Configuration Builder
Apache License 2.0
5 stars 1 forks source link

BUG-__main__ is not recognized when using notebooks #80

Closed AlexandreSajus closed 11 months ago

AlexandreSajus commented 1 year ago

Description When selecting a function coming from main.py in a task node in Taipy Studio, it will define it in the config as main .function When running Taipy Core in Python scripts, taipy understands that main is in main.py When running in a notebook, taipy does not find the function image

How to reproduce

Create a main.py with a function. Create a config with a task node calling that function: the config will save it as main .function Run the scenario inside a notebook; the notebook should return an error explaining that module main has no attribute function.

Expected behavior Don't convert main.py to main inside the config file, or help notebooks recognize that main can be the main.py file.

Runtime environment Please specify relevant indications.

trgiangdo commented 1 year ago
trgiangdo commented 1 year ago

Also, there can be a hidden bug to this.

Assume that the project has:

Sometimes there can be a confusion of which file is actually the __main__ module.

image

Like in this case, the utils.py is now the __main__ module.

FredLL-Avaiga commented 1 year ago

in studio, the user can specify which is the main module: right click in the file explorer view :-)

FredLL-Avaiga commented 1 year ago

Allow the user to either choose main or main.py

I think that would be the easiest solution for everyone.

trgiangdo commented 1 year ago

in studio, the user can specify which is the main module: right click in the file explorer view :-)

Oh, I did not know that. Sorry 🥲

Allow the user to either choose main or main.py

I think that would be the easiest solution for everyone.

Yes I agree. Let's discuss with the CS team