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

top level folder is used before reading JSON settings #1089

Closed
jolopezl opened this issue Apr 20, 2022 · 0 comments · Fixed by #1090
Closed

top level folder is used before reading JSON settings #1089

jolopezl opened this issue Apr 20, 2022 · 0 comments · Fixed by #1090
Assignees

Comments

@jolopezl
Copy link
Contributor

jolopezl commented Apr 20, 2022

I have in backend.json a field for the top_level_folder:

~/temp/CARTAvis/carta-backend/build (dev)$ cat ~/.carta/backend.json | grep top_level_folder
    "top_level_folder": "/Users/lopez/temp/CARTAvis",

If I start carta, and do:

$ ./carta_backend ~/temp/CARTAvis/data/supermosaic.10.hdf5 

I get the following address:

http://localhost:3020/?token=2E47A4E8-A420-4507-A8DD-66ED2F6EA7A7&file=Users%2Flopez%2Ftemp%2FCARTAvis%2Fdata%2Fsupermosaic.10.hdf5

Which, as you can see is incorrect. It actually does not exist, and CARTA will not open it. I mentioned before that I needed to edit it by hand, because the URL should have resulted in something relative to my top_level_folder. Now, following KS example, I set the top_level_folder to on the command line, overriding my settings, then start CARTA as:

$ ./carta_backend --top_level_folder ~/temp/CARTAvis ~/temp/CARTAvis/data/supermosaic.10.hdf5

Which parses the correct URL:

http://localhost:3020/?token=6E6DD32E-3642-4235-A1D4-283BBA890B4B&file=data%2Fsupermosaic.10.hdf5

The problem is here: https://github.com/CARTAvis/carta-backend/blob/dev/src/Main/ProgramSettings.cc#L375-L382. The files are pushed before the JSON settings override the command line settings which come first, so top_level_folder is "" at that moment.

@jolopezl jolopezl changed the title top level folder is used before reading JSON seetings top level folder is used before reading JSON settings Apr 20, 2022
@jolopezl jolopezl self-assigned this Apr 20, 2022
@jolopezl jolopezl linked a pull request Apr 21, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant