cookiecutter-django: Getting an error when setting up a new project

Traceback (most recent call last):
  File "/Users/captain/PycharmProjects/a8/.venv/bin/cookiecutter", line 11, in <module>
    sys.exit(main())
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/cookiecutter/cli.py", line 123, in main
    default_config=default_config,
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/cookiecutter/main.py", line 91, in cookiecutter
    output_dir=output_dir
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/cookiecutter/generate.py", line 349, in generate_files
    generate_file(project_dir, infile, context, env)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/cookiecutter/generate.py", line 153, in generate_file
    if is_binary(infile):
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/binaryornot/check.py", line 25, in is_binary
    return is_binary_string(chunk)
  File "/Users/captain/PycharmProjects/a8/.venv/lib/python3.5/site-packages/binaryornot/helpers.py", line 96, in is_binary_string
    if (detected_encoding['confidence'] > 0.9
TypeError: 'NoneType' object is not subscriptable

OS: OSX Python 3.5.3 (default, Jan 26 2017, 13:12:44) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (8 by maintainers)

Most upvoted comments

@hackebrot No, we don’t generate the PyCharm files in CI. If one of the PyCharm staff wants to submit a PR for it, that would be awesome.

ping @pauleveritt

@plus500s chardet released new version yesterday. a very large changes in the code base.: https://github.com/chardet/chardet/compare/2.3.0...3.0.1

try install a old version of chardet:

pip install "chardet<3.0.0"

And see if the error occur again …