Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection of a directory in dash #29

Closed
christian-oreilly opened this issue Feb 19, 2023 · 1 comment · Fixed by #84
Closed

Selection of a directory in dash #29

christian-oreilly opened this issue Feb 19, 2023 · 1 comment · Fixed by #84
Labels
Dash topics related to the pylossles QCR Dashboard

Comments

@christian-oreilly
Copy link
Collaborator

The current code used to select a folder has multiple issues (does not work on MacOS, open the window in background). It is unclear that it is a good idea to use TkInter in combination with Dash.

Issues with threads interfering with one another has been reported at multiple places, e.g., here: https://community.plotly.com/t/core-component-allow-select-folder/14955/11

Maybe the TkInter issues can be solved (https://stackoverflow.com/questions/67702316/combining-plotly-dash-with-a-tkinter-gui-dash-forces-to-execute-the-tk-mainloo) but I am unsure that it will provide a robust solution. Maybe a native Dash solution would be preferable.

A folder selection dash-core-component has been asked for in 2019 and upvoted multiple times, but without apparently having caught the attention of the developers: plotly/dash-core-components#639

Other relevant links:

@scott-huberty
Copy link
Member

open the window in background

I solved this part on my windows machine. The code to get the directory to open on top of other windows is on my local machine. But this is pointless given the broader issue you raise.

yes... I too spent much of my weekend trying to find a solution (to no avail) for my mac, regarding getting tkinter askdirectory to work in a dash callback.

Maybe we can use the dcc.upload button instead (although it's less ideal. While it's possible to allow for selection of multiple files and to filter by file types, you cannot select a directory).

@scott-huberty scott-huberty added this to the 0.01 deployment milestone Mar 8, 2023
@scott-huberty scott-huberty added the Dash topics related to the pylossles QCR Dashboard label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dash topics related to the pylossles QCR Dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants