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

Saving file directory is hard-coded by the relative path in the code #106

Open
Shine226 opened this issue Aug 28, 2019 · 7 comments
Open
Assignees
Labels
help wanted Extra attention is needed

Comments

@Shine226
Copy link
Collaborator

Shine226 commented Aug 28, 2019

We need to find a better way for the saving path.
JS doesn't provide a way to browser a folder dialog.

@brownsarahm
Copy link
Collaborator

Current research:

Possible temporary soln

put only config_example under version control
and the config file will have the location on that local system where the person wants things saved
for now we can require the person to manually edit that file and in the futur we can figure out how to do it automatically

@brownsarahm brownsarahm added this to the Code Release milestone Nov 11, 2019
@brownsarahm
Copy link
Collaborator

when this is solved docs/source/wiggum_app.rst needs to also be updated to reflect this changed

@brownsarahm brownsarahm added the help wanted Extra attention is needed label Dec 2, 2019
@brownsarahm
Copy link
Collaborator

If we get this one solved, we can submit Wiggum to pipy, but if this is not solved, we can't because Wiggum can only currently work if run from the same directory as the data, which is complicated.

We might be able to come up with another workaround set of instructions for how to launch the app so that it can work without being launched in the code directory, but one of these needs to happen before submitting it to pipy makes sense.

@brownsarahm
Copy link
Collaborator

@brownsarahm
Copy link
Collaborator

brownsarahm commented May 11, 2020

This issue captures multiple related problems:

  • cannot open data from other places
  • wiggum needs to be launched from the directory where you want to save
  • need to be able to access default data from installed copy

@Shine226
Copy link
Collaborator Author

Tried flask.send_file https://community.plotly.com/t/allowing-users-to-download-csv-on-click/5550, but the function doesn't send file to anyplace.

@Shine226
Copy link
Collaborator Author

Shine226 commented Aug 20, 2020

I added code under 'save' action:
send_file('/Users/chenguangxu/Documents/GitHub/detect_simpsons_paradox_dev/data/genderpaygap/df.csv' , as_attachment=True)

Since os.path.join(directory,data_csv) doesn't give me a correct path, I used a hard-coded file path instead.

Shine226 added a commit that referenced this issue Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants