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

Improve error for when file does not exist #52

Closed
colinbrislawn opened this issue Jun 15, 2019 · 0 comments · Fixed by #58 or #74
Closed

Improve error for when file does not exist #52

colinbrislawn opened this issue Jun 15, 2019 · 0 comments · Fixed by #58 or #74

Comments

@colinbrislawn
Copy link

colinbrislawn commented Jun 15, 2019

Tried to upload file that didn't exist. More clear error would be nice.

>$ pacifica-cli upload --interactive test-upload.txt 

Traceback (most recent call last):
  File "/home/asdf/miniconda3/envs/pacifica/bin/pacifica-cli", line 10, in <module>
    sys.exit(main())
  File "/home/asdf/miniconda3/envs/pacifica/lib/python3.6/site-packages/pacifica/cli/__main__.py", line 144, in main
    args.func(args, config_data)
  File "/home/asdf/miniconda3/envs/pacifica/lib/python3.6/site-packages/pacifica/cli/methods.py", line 178, in upload
    md_update = query(args, interface_data)
  File "/home/asdf/miniconda3/envs/pacifica/lib/python3.6/site-packages/pacifica/cli/methods.py", line 191, in query
    md_update.extend(interface_data)
  File "/home/asdf/miniconda3/envs/pacifica/lib/python3.6/site-packages/pacifica/uploader/metadata/metadata.py", line 74, in extend
    for value in iterable:
TypeError: 'NoneType' object is not iterable
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Aug 9, 2019
This adds a nice file not found error message if a file or
directory is specified on the command line that does not exist.

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Aug 9, 2019
This adds a nice file not found error message if a file or
directory is specified on the command line that does not exist.

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 3, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 3, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 4, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 4, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 4, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 4, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 4, 2020
This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix pacifica#52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit that referenced this issue Feb 4, 2020
* Fix #52 add file not found error message

This adds a nice file not found error message if a file or
directory is specified on the command line that does not exist.

Signed-off-by: David Brown <dmlb2000@gmail.com>

* Raise Error for File Not Found

This raises an error if the file passed on the command line is not
found. This should make the CLI behave more appropriately when
mistakes are made in the arguments on the command line.

Fix #52

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit to dmlb2000/pacifica-cli that referenced this issue Feb 5, 2020
- Pull pacifica#73 Add Python 3.7 and 3.8 by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#70 Add Version Moodule by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#68 Add JSONSchema Validation by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#66 Add Kerberos/GSSAPI Authentication by [dmlb2000](https://github.com/dmlb2000)
- Fix pacifica#55 Add Basic Authentication Env Vars by [casey-pnnl](https://github.com/casey-pnnl)
- Fix pacifica#52 Add File Not Found Error by [dmlb2000](https://github.com/dmlb2000)
- Fix pacifica#56 Resolve User Logon Always by [dmlb2000](https://github.com/dmlb2000)
- Fix pacifica#53 Add Env/CLI for config.ini by [dmlb2000](https://github.com/dmlb2000)
- Fix pacifica#61 Do not save during global read by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#67 Add Ansible to Travis CI by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#65 Updated Pylint 2.0+ by [dmlb2000](https://github.com/dmlb2000)
- Pull pacifica#64 Remove Python 2.7 by [dmlb2000](https://github.com/dmlb2000)
- Fix pacifica#51 Remove Query Results by [dmlb2000](https://github.com/dmlb2000)

Signed-off-by: David Brown <dmlb2000@gmail.com>
dmlb2000 added a commit that referenced this issue Feb 5, 2020
- Pull #73 Add Python 3.7 and 3.8 by [dmlb2000](https://github.com/dmlb2000)
- Pull #70 Add Version Moodule by [dmlb2000](https://github.com/dmlb2000)
- Pull #68 Add JSONSchema Validation by [dmlb2000](https://github.com/dmlb2000)
- Pull #66 Add Kerberos/GSSAPI Authentication by [dmlb2000](https://github.com/dmlb2000)
- Fix #55 Add Basic Authentication Env Vars by [casey-pnnl](https://github.com/casey-pnnl)
- Fix #52 Add File Not Found Error by [dmlb2000](https://github.com/dmlb2000)
- Fix #56 Resolve User Logon Always by [dmlb2000](https://github.com/dmlb2000)
- Fix #53 Add Env/CLI for config.ini by [dmlb2000](https://github.com/dmlb2000)
- Fix #61 Do not save during global read by [dmlb2000](https://github.com/dmlb2000)
- Pull #67 Add Ansible to Travis CI by [dmlb2000](https://github.com/dmlb2000)
- Pull #65 Updated Pylint 2.0+ by [dmlb2000](https://github.com/dmlb2000)
- Pull #64 Remove Python 2.7 by [dmlb2000](https://github.com/dmlb2000)
- Fix #51 Remove Query Results by [dmlb2000](https://github.com/dmlb2000)

Signed-off-by: David Brown <dmlb2000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant