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

moban should report the directory is missing #8

Closed
jayvdb opened this issue Nov 18, 2017 · 3 comments
Closed

moban should report the directory is missing #8

jayvdb opened this issue Nov 18, 2017 · 3 comments

Comments

@jayvdb
Copy link
Member

jayvdb commented Nov 18, 2017

Running moban on an uninitialised pyexcel/pyexcel clone:

OSError: Both pyexcel.yaml and commons/config/pyexcel.yaml does not exist

This is a little confusing.
It would be better to identify that commons doesnt exist.
And per #6 , moban should find it automatically!

Also pyexcel.yml exists, which may cause the user to wonder if that is related to the problem.

@jayvdb
Copy link
Member Author

jayvdb commented Nov 18, 2017

Likewise if only commons exists, running moban without setupmobans results in:

$ moban
Traceback (most recent call last):
  File "/bin/moban", line 11, in <module>
    load_entry_point('moban', 'console_scripts', 'moban')()
  File "/.../moban/main.py", line 37, in main
    handle_moban_file(options)
  File "/.../moban/main.py", line 98, in handle_moban_file
    handle_moban_file_v1(moban_file_configurations, options)
  File "/.../moban/mobanfile.py", line 23, in handle_moban_file_v1
    engine.render_to_files(list_of_templating_parameters)
  File "/.../moban/engine.py", line 55, in render_to_files
    self._render_with_finding_data_first(sta.data_file_index)
  File "/.../moban/engine.py", line 85, in _render_with_finding_data_first
    flag = self._apply_template(template, data, output)
  File "/.../moban/engine.py", line 92, in _apply_template
    rendered_content = template.render(**data).encode('utf-8')
  File "/.../jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/.../jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/.../jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File ".moban.d/setup.py", line 1, in top-level template code
    {% extends 'setup.py.jj2' %}
  File "/.../jinja2/loaders.py", line 187, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: setup.py.jj2

@chfw
Copy link
Member

chfw commented Nov 18, 2017

Yep, I will fix it.

@chfw chfw closed this as completed in ca60728 Nov 18, 2017
@chfw
Copy link
Member

chfw commented Nov 18, 2017

v0.0.8 will report it as the following example output:

screen shot 2017-11-18 at 23 02 33

chfw added a commit that referenced this issue Nov 17, 2018
chfw added a commit that referenced this issue Nov 18, 2018
* 🔥 separate handlebars to moban-handlebars

* 🐛 fix get_primary_key will fail when a module is loaded later. fix #8. and remove pybars3

* 📚 update handlebars usage

* 🐛 moban hash does not work because trailing new line was not removed when the hash is calculated but is removed when saving the files. hence moban think the file is always updated. 🔥 remove engine handlebars loading

* 📚 update conf.py from pypi-mobans-pkg

* 💚 use moban-handlebars git repo for testing

* 📚 update change log, docs and correct typepos
ayan-b pushed a commit to ayan-b/moban that referenced this issue Jan 15, 2019
* 🔥 separate handlebars to moban-handlebars

* 🐛 fix get_primary_key will fail when a module is loaded later. fix moremoban#8. and remove pybars3

* 📚 update handlebars usage

* 🐛 moban hash does not work because trailing new line was not removed when the hash is calculated but is removed when saving the files. hence moban think the file is always updated. 🔥 remove engine handlebars loading

* 📚 update conf.py from pypi-mobans-pkg

* 💚 use moban-handlebars git repo for testing

* 📚 update change log, docs and correct typepos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants