Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Call out non-existent paths when attempting to archive #2

Closed
ethall opened this issue Feb 27, 2019 · 0 comments
Closed

Call out non-existent paths when attempting to archive #2

ethall opened this issue Feb 27, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ethall
Copy link
Collaborator

ethall commented Feb 27, 2019

Subject of the issue

Syphon tries to create a lock file without checking whether the target directory exists.

Your environment

  • Python 3.6.6
  • Syphon 0.1.1

Steps to reproduce

  1. Create a temporary archive directory (example_archive in subsequent steps).
  2. Initialize the directory for Syphon use:
$ syphon init example_archive blah
  1. Try to archive data from a directory that does not exist:
$ syphon archive -d .\fake\location\*.csv data

Expected behaviour

An understandable error message should be returned.

Actual behaviour

The following is printed:

Traceback (most recent call last):
  File "C:\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Source\forked\syphon\syphon\__main__.py", line 99, in <module>
    bootstrap(argv)
  File "C:\Source\forked\syphon\syphon\__main__.py", line 15, in bootstrap
    exit(_main(args))
  File "C:\Source\forked\syphon\syphon\__main__.py", line 84, in _main
    archive(this_context)
  File "C:\Source\forked\syphon\syphon\archive\archive.py", line 45, in archive
    lock_list.append(lock_manager.lock(split(data_list[0])[0]))
  File "C:\Python36\lib\site-packages\sortedcontainers\sortedlist.py", line 641, in __getitem__
    raise IndexError('list index out of range')
IndexError: list index out of range
@ethall ethall added the bug Something isn't working label Feb 27, 2019
@ethall ethall self-assigned this Sep 28, 2019
@ethall ethall mentioned this issue Sep 28, 2019
6 tasks
ethall added a commit that referenced this issue Sep 30, 2019
* Added check submodule

* Updated archive's functional and command-line arguments

* Updated build's functional and command-line arguments

* Having too few arguments now returns 1

* Updated trove classifiers and module description

* Removed Context for more expressive arguments

* Removed get_parser from root-level module exports

* Reorganized to resolve import collisions

* Fixed archive not checking for schema file existence

* Updated checkcolumns error message (#3)

* Error on nonexistent archive source files (#2)

* Formatted with black, isort
@ethall ethall closed this as completed Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant