Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-16081

error when trying to create a python package

    Details

    • Type: Bug
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: templates
    • Labels:
      None
    • Templates:
    • Story Points:
      0
    • Team:
      SQuaRE

      Description

      I received an error when trying to create a new python package using `templatekit`:

      [lsst@b3a8c92b6e26 foo]$ ls

      templates

      [lsst@b3a8c92b6e26 foo]$ cd templates

      [lsst@b3a8c92b6e26 templates]$ templatekit make stack_package -o ../

      package_name [example]: notify

      copyright_year [2018]

      Select copyright_holder:

      1 - Association of Universities for Research in Astronomy

      2 - California Institute of Technology

      3 - The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory

      4 - The Trustees of Princeton University

      5 - University of Illinois Champaign-Urbana

      6 - University of Washington

      Choose from 1, 2, 3, 4, 5, 6 [1]: 5

      Select github_org:

      1 - lsst

      2 - lsst-dm

      3 - lsst-sims

      4 - lsst-ts

      Choose from 1, 2, 3, 4 [1]: 2

      Select uses_cpp:

      1 - True

      2 - False

      Choose from 1, 2 [1]: 2

      Select uses_python:

      1 - True

      2 - False

      Choose from 1, 2 [1]: 1

      python_module [lsst.notify]

      python_sub_dirs [lsst/notify]

      Traceback (most recent call last):

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/bin/templatekit", line 11, in <module>

          load_entry_point('templatekit==0.0.0', 'console_scripts', 'templatekit')()

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/core.py", line 722, in _call_

          return self.main(*args, **kwargs)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/core.py", line 697, in main

          rv = self.invoke(ctx)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/core.py", line 1066, in invoke

          return _process_result(sub_ctx.command.invoke(sub_ctx))

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/core.py", line 895, in invoke

          return ctx.invoke(self.callback, **ctx.params)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/core.py", line 535, in invoke

          return callback(*args, **kwargs)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func

          return f(get_current_context().obj, *args, **kwargs)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/templatekit/scripts/make.py", line 57, in make

          _handle_project_template(template, output_path)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/templatekit/scripts/make.py", line 99, in _handle_project_template

          extra_context=None)

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/cookiecutter/main.py", line 94, in cookiecutter

          output_dir=output_dir

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/cookiecutter/generate.py", line 341, in generate_files

          overwrite_if_exists

        File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/cookiecutter/generate.py", line 208, in render_and_create_dir

          raise OutputDirExistsException(msg)

      cookiecutter.exceptions.OutputDirExistsException: Error: "/home/lsst/foo/notify/python/lsst" directory already exists

      [lsst@b3a8c92b6e26 templates]

       

        Attachments

          Activity

            People

            • Assignee:
              jsick Jonathan Sick
              Reporter:
              spietrowicz Steve Pietrowicz
              Watchers:
              Jonathan Sick, Steve Pietrowicz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel