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

list tasks in subdir causes exception #226

Closed
michikuehne opened this issue Oct 28, 2015 · 4 comments
Closed

list tasks in subdir causes exception #226

michikuehne opened this issue Oct 28, 2015 · 4 comments

Comments

@michikuehne
Copy link

Hi,

If executing "pyb -t" or "pyb --list-tasks" in a subdir from the dir, where the build.py is located, causes the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pyb", line 25, in <module>
    sys.exit(pybuilder.cli.main(*sys.argv[1:]))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pybuilder/cli.py", line 326, in main
    project_directory=options.project_directory)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pybuilder/reactor.py", line 102, in prepare_build
    project_directory, project_descriptor)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pybuilder/reactor.py", line 294, in verify_project_directory
    project_descriptor_full_path)
pybuilder.errors.PyBuilderException: Project directory does not contain descriptor file: /Users/michi/git/immobilienscout24/afp-cli/src/build.py

I excepted the task list or a helpful error message.

Best,
Michael

@esc
Copy link
Contributor

esc commented Oct 28, 2015

pyb only works in the top-level directory at the moment.

@arcivanov
Copy link
Member

@michikuehne, @esc is correct, not a bug

@mriehl
Copy link
Member

mriehl commented Oct 29, 2015

On a side note, the exception handling could be a bit better - if you just run pyb we show a helpful error message:

2015-10-29 14:13:01 (venv) mriehl@isdeblnnl084 /tmp 
» pyb
PyBuilder version 0.11.3.dev20151027182948
Build started at 2015-10-29 14:13:02
------------------------------------------------------------
------------------------------------------------------------
BUILD FAILED - Project directory does not contain descriptor file: /tmp/build.py
------------------------------------------------------------
Build finished at 2015-10-29 14:13:02
Build took 0 seconds (0 ms)

but if you run pyb -t we show a stack trace (which is not user friendly):

» pyb -t
Traceback (most recent call last):
  File "/tmp/venv/bin/pyb", line 25, in <module>
    sys.exit(pybuilder.cli.main(*sys.argv[1:]))
  File "/tmp/venv/local/lib/python2.7/site-packages/pybuilder/cli.py", line 326, in main
    project_directory=options.project_directory)
  File "/tmp/venv/local/lib/python2.7/site-packages/pybuilder/reactor.py", line 102, in prepare_build
    project_directory, project_descriptor)
  File "/tmp/venv/local/lib/python2.7/site-packages/pybuilder/reactor.py", line 294, in verify_project_directory
    project_descriptor_full_path)
pybuilder.errors.PyBuilderException: Project directory does not contain descriptor file: /tmp/build.py

mriehl added a commit that referenced this issue Oct 29, 2015
This resolves the usability part from #226
@mriehl
Copy link
Member

mriehl commented Oct 29, 2015

@michikuehne latest dev release should produce a helpful error message

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

4 participants