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

datacrates page should be empty on first use #23

Open
marc-portier opened this issue Jul 15, 2022 · 3 comments
Open

datacrates page should be empty on first use #23

marc-portier opened this issue Jul 15, 2022 · 3 comments
Assignees

Comments

@marc-portier
Copy link
Member

I just did a recent git pull and started the ./dmbon-assistant.sh start
after passing the first-use wizard (see #21 and #22) I get to the homepage

when I follow the link down to the http://localhost:3000/Datacrates I am seeing the list is not empty (but containing 3 empty crates):
image

this should not happen - I suppose some strange default is around in the code-base ?

@marc-portier
Copy link
Member Author

when trying to delete the spaces I get stuck on this dialog:

image

with this log comming along:

2022-07-15 12:26:28 @app.model.location   [DEBUG   ] getting instance of <class 'app.model.location.Locations'>with args == () && kwargs == {}
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] space deletion error
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] 'undefined'
Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 332, in delete_space
    shutil.rmtree(data[space_id]["storage_path"])
KeyError: 'undefined'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 335, in delete_space
    for i in os.listdir(data[space_id]["storage_path"]):
KeyError: 'undefined'
2022-07-15 12:26:28 @app.model.location   [DEBUG   ] getting instance of <class 'app.model.location.Locations'>with args == () && kwargs == {}
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] space deletion error
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] 'undefined'
Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 332, in delete_space
    shutil.rmtree(data[space_id]["storage_path"])
KeyError: 'undefined'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 335, in delete_space
    for i in os.listdir(data[space_id]["storage_path"]):
KeyError: 'undefined'
2022-07-15 12:26:28 @app.model.location   [DEBUG   ] getting instance of <class 'app.model.location.Locations'>with args == () && kwargs == {}
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] space deletion error
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] 'undefined'
Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 332, in delete_space
    shutil.rmtree(data[space_id]["storage_path"])
KeyError: 'undefined'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 335, in delete_space
    for i in os.listdir(data[space_id]["storage_path"]):
KeyError: 'undefined'
2022-07-15 12:26:28 @app.model.location   [DEBUG   ] getting instance of <class 'app.model.location.Locations'>with args == () && kwargs == {}
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] space deletion error
2022-07-15 12:26:28 @app.routers.APIV1.spaces [ERROR   ] 'undefined'
Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 332, in delete_space
    shutil.rmtree(data[space_id]["storage_path"])
KeyError: 'undefined'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/extra/projects/vliz.projects/vliz.be-opsci/dmbon-assistant/backend/./app/routers/APIV1/spaces.py", line 335, in delete_space
    for i in os.listdir(data[space_id]["storage_path"]):
KeyError: 'undefined'

@marc-portier
Copy link
Member Author

also note --> the dialog should warn about deleting a Datacrate (and not a space)

@marc-portier
Copy link
Member Author

quick hack to get around the issue is to apply

$ for n in profiles spaces; do echo "{}" > ./backend/app/webtop-work-space/$n.json; done

suggesting:

  • can we remove these files from the commit?
  • add them to .gitignore too (odd to see that spaces is already in ther 3 times)
  • and probably the same should happen to the user-data there too?
  • in fact that whole folder should be excluded from the commit !!
  • and then introduce empty {} variants of those at the moment the initial setup is done? (generate together with user-data.json)

in fact: might be useful to guide the first-time-user a bit further down to adding their first datacrate ?

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

No branches or pull requests

2 participants