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

Incompatibility with newer cookiecutter versions #68

Closed
bollwyvl opened this issue Oct 27, 2021 · 0 comments · Fixed by #69
Closed

Incompatibility with newer cookiecutter versions #68

bollwyvl opened this issue Oct 27, 2021 · 0 comments · Fixed by #69
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@bollwyvl
Copy link
Contributor

bollwyvl commented Oct 27, 2021

Description

The cookiecutter starter fails to import, probably due to some bad upstream metadata:

Reproduce

  • Install jupyter-starters (latest) and cookiecutter (latest)
  • Start jupyter lab
  • See some errors
terminal output
 Traceback (most recent call last):
      File "~/.venv/lib/python3.9/site-packages/traitlets/traitlets.py", line 537, in get
        value = obj._trait_values[self.name]
    KeyError: '_starters'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "~/.venv/lib/python3.9/site-packages/notebook/notebookapp.py", line 2030, in init_server_extensions
        func(self)
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/serverextension.py", line 11, in load_jupyter_server_extension
        nbapp.log.info(f"""<U+1F4A1> starters: {", ".join(manager.starter_names)}""")
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/manager.py", line 131, in starter_names
        return sorted(dict(self.starters).keys())
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/manager.py", line 113, in starters
        for name, starter in dict(self._starters).items():
      File "~/.venv/lib/python3.9/site-packages/traitlets/traitlets.py", line 577, in __get__
        return self.get(obj, cls)
      File "~/.venv/lib/python3.9/site-packages/traitlets/traitlets.py", line 540, in get
        default = obj.trait_defaults(self.name)
      File "~/.venv/lib/python3.9/site-packages/traitlets/traitlets.py", line 1580, in trait_defaults
        return self._get_trait_default_generator(names[0])(self)
      File "~/.venv/lib/python3.9/site-packages/traitlets/traitlets.py", line 977, in __call__
        return self.func(*args, **kwargs)
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/manager.py", line 101, in _default_starters
        starters.update(cookiecutter_starters(self))
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/py_starters/cookiecutter.py", line 95, in cookiecutter_starters
        *cookiecutter_pantry(),
      File "~/.venv/lib/python3.9/site-packages/jupyter_starters/py_starters/cookiecutter.py", line 119, in cookiecutter_pantry
        str(metadata("cookiecutter")).split("Pantry")[1].split("\n## ")[0].strip()
      File "~/.venv/lib/python3.9/email/message.py", line 135, in __str__
        return self.as_string()
      File "~/.venv/lib/python3.9/email/message.py", line 158, in as_string
        g.flatten(self, unixfrom=unixfrom)
      File "~/.venv/lib/python3.9/email/generator.py", line 116, in flatten
        self._write(msg)
      File "~/.venv/lib/python3.9/email/generator.py", line 199, in _write
        self._write_headers(msg)
      File "~/.venv/lib/python3.9/email/generator.py", line 226, in _write_headers
        self.write(self.policy.fold(h, v))
      File "~/.venv/lib/python3.9/email/_policybase.py", line 326, in fold
        return self._fold(name, value, sanitize=True)
      File "~/.venv/lib/python3.9/email/_policybase.py", line 369, in _fold
        parts.append(h.encode(linesep=self.linesep, maxlinelen=maxlinelen))
      File "~/.venv/lib/python3.9/email/header.py", line 389, in encode
        raise HeaderParseError("header value appears to contain "
  • don't see API responses, or any UI (cookiecutter or otherwise)

Expected behavior

  • See (empty) cookiecutter list
  • See other starters

Context

  • trying to write a new starter, don't even want cookiecutter
@bollwyvl bollwyvl added bug Something isn't working dependencies Pull requests that update a dependency file labels Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant