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

no blueprint named default exists #9

Closed
amalshaji opened this issue Sep 1, 2021 · 8 comments
Closed

no blueprint named default exists #9

amalshaji opened this issue Sep 1, 2021 · 8 comments

Comments

@amalshaji
Copy link

Describe the bug
Error while running barely new

To Reproduce
Steps to reproduce the behavior:

(.venv) ➜  barely-test pip install barely
(.venv) ➜  barely-test barely        
[barely][  core][ERROR] :: could not find 'config.yaml'. Exiting
(.venv) ➜  barely-test barely new
[barely][  core][ERROR] :: no blueprint named default exists.

Expected behavior

$ barely new
[barely][  core][ INFO] :: setting up new project with parameters:
                        ->   webroot: webroot
                        ->   devroot: devroot
                        -> blueprint: default
[barely][  core][ INFO] :: setting up basic config...
[barely][  core][ INFO] :: done.

Desktop (please complete the following information):

➜  lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

WSL2

@charludo
Copy link
Owner

charludo commented Sep 1, 2021

Huh, that's weird! Could you check barely blueprints to see if any are found at all?

@amalshaji
Copy link
Author

[barely][  core][ INFO] :: found 0 blueprints:

@charludo
Copy link
Owner

charludo commented Sep 1, 2021

OK. Does barely --debug new output anything remotely sensible as the expected blueprint locations? If so, is there anything there?

@amalshaji
Copy link
Author

(.venv) ➜  barely-test barely --debug new
[barely][  core][DEBUG] :: Logging setup complete
[barely][  core][DEBUG] :: platform: Unix-like
[barely][  core][DEBUG] :: checked / created plugins/content
[barely][  core][DEBUG] :: checked / created plugins/backup
[barely][  core][DEBUG] :: checked / created plugins/publication
[barely][  core][DEBUG] :: checked / created blueprints
[barely][  core][DEBUG] :: created all required dirs
[barely][  core][DEBUG] :: platform: Unix-like
[barely][  core][DEBUG] :: looking for blueprints in: /home/amalshaji/Workspace/barely-test/.venv/lib/python3.9/site-packages/blueprints
[barely][  core][DEBUG] :: looking for blueprints in: /home/amalshaji/.barely/blueprints
[barely][  core][ERROR] :: no blueprint named default exists.
(.venv) ➜  barely-test ls
(.venv) ➜  barely-test ls ~/.barely 
blueprints  plugins
(.venv) ➜  barely-test ls ~/.barely/blueprints

The folder is empty

@charludo
Copy link
Owner

charludo commented Sep 1, 2021

Yes, ~/.barely/blueprints is for your own blueprints so it's initially empty.

The first path isn't right though, there's a /barely/ missing in there. Seems like pythons __file__ does not behave as I expected in your case.

I'll implement a fix and let you know later today when it's published. In the mean time, if you want to, you can just copy the default folder and contents from the blueprints in the github project and place it in ~/.barely/blueprints, that should do the same trick.

@amalshaji
Copy link
Author

it works

@charludo
Copy link
Owner

charludo commented Sep 1, 2021

Should be fixed with b68001b. The error originated from the way packages are bundled for PyPI, the blueprints were simply not included in that. Moved the entire blueprints folder into barely-proper.

@charludo
Copy link
Owner

charludo commented Sep 1, 2021

Fix is live on PyPI, so I'll close the issue.

Thank you for the bug report!

@charludo charludo closed this as completed Sep 1, 2021
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