noahmorrison / chevron

A Python implementation of mustache
MIT License
510 stars 54 forks source link

TypeError: expected str, bytes or os.PathLike object, not dict #124

Open habibutsu opened 1 year ago

habibutsu commented 1 year ago

run the follwogin command chevron ./test.mustache I've got following error:

Traceback (most recent call last):
  File "/home/habibutsu/.pyenv/versions/venv3.11/bin/chevron", line 8, in <module>
    sys.exit(cli_main())
             ^^^^^^^^^^
  File "/home/habibutsu/.pyenv/versions/3.11.4/envs/venv3.11/lib/python3.11/site-packages/chevron/main.py", line 100, in cli_main
    sys.stdout.write(main(**args))
                     ^^^^^^^^^^^^
  File "/home/habibutsu/.pyenv/versions/3.11.4/envs/venv3.11/lib/python3.11/site-packages/chevron/main.py", line 19, in main
    with io.open(data, 'r', encoding='utf-8') as data_file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not dict
Name: chevron
Version: 0.14.0
Summary: Mustache templating language renderer
Home-page: https://github.com/noahmorrison/chevron
Author: noah morrison
Author-email: noah@morrison.ph
License: MIT
Location: /home/habibutsu/.pyenv/versions/3.11.4/envs/venv3.11/lib/python3.11/site-packages
Requires: 
Required-by: