Skip to content

mrbod fails: TypeError: expected str, bytes or os.PathLike object, not NoneType #89

Description

@htgoebel

When I try to setup a template using mrbob, mrbob crashes with (full traceback see below):

TypeError: expected str, bytes or os.PathLike object, not NoneType

How to reproduce (taken from https://training.plone.org/5/theming/theme-package.html)

virtualenv --python /usr/bin/python3.7 /tmp/mrbobvenv
cd /tmp/mrbobvenv
bin/pip install mr.bob bobtemplates.plone
bin/mrbob -O plonetheme.tango bobtemplates:plone_addon

Traceback:

Traceback (most recent call last):
  File "bin/mrbob", line 10, in <module>
    sys.exit(main())
  File "/tmp/mrbobvenv/lib/python3.7/site-packages/mrbob/cli.py", line 155, in main
    defaults=defaults)
  File "/tmp/mrbobvenv/lib/python3.7/site-packages/mrbob/configurator.py", line 138, in __init__
    self.template_dir, self.is_tempdir = parse_template(template)
  File "/tmp/mrbobvenv/lib/python3.7/site-packages/mrbob/configurator.py", line 92, in parse_template
    path = resolve_dotted_path(template_name)
  File "/tmp/mrbobvenv/lib/python3.7/site-packages/mrbob/configurator.py", line 40, in resolve_dotted_path
    return os.path.join(os.path.dirname(module.__file__), dir_name)
  File "/tmp/mrbobvenv/lib64/python3.7/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions