Skip to content

Error with python six module during boilerplate generation #5

@BastienFaure

Description

@BastienFaure

Hello,

SInce several months, I have this error when creating a boilerplate :

Editor: 
    creating /tmp/p/VERSION...
    creating /tmp/p/.gitignore...
    creating /tmp/p/README.rst...
    creating /tmp/p/INSTALL.rst...
    creating /tmp/p/LICENSE...
    creating /tmp/p/tox.ini...
    creating /tmp/p/.travis.yml...
    creating /tmp/p/.coveragerc...
    creating /tmp/p/tasks.py...
    creating /tmp/p/setup.py...
    creating /tmp/p/MANIFEST.in...
    creating /tmp/p/requirements.txt...
    creating /tmp/p/src/aaaaaaaa/__init__.py...
    creating /tmp/p/src/aaaaaaaa/__main__.py...
Traceback (most recent call last):
  File "/usr/local/bin/python-boilerplate", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/__main__.py", line 11, in main
    func(args)
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/commands/parser.py", line 41, in handler
    func(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/commands/parser.py", line 32, in handler
    writer.run()
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/commands/init.py", line 115, in run
    self.write('package/meta.pyt', '%s/__meta__.py' % basedir)
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/core.py", line 140, in write
    hash = write_template(template, context, ignore=ignore, path=path)
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/jinja.py", line 33, in write_template
    data = template.render(**(namespace or {}))
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/templates/package/meta.pyt", line 3, in top-level template code
    __author__ = {{ author|unicode_escape|repr }}
  File "/usr/local/lib/python2.7/dist-packages/python_boilerplate/jinja.py", line 79, in unicode_escape
    return six.u(x).encode('unicode-escape').decode()
  File "/usr/local/lib/python2.7/dist-packages/six.py", line 647, in u
    return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")

Did you encountered this error ?

Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions