You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, first of all, what an amazing piece of work you did!
I have been trying to use the make_map function but it keeps throwing an error from the jinja package:
TemplateNotFoundTraceback (mostrecentcalllast)
<ipython-input-12-9710dea75156>in<module>1# my_wn_dataframe.make_map(output_file=None, map_columns=[], tooltip_columns=[], geojson_layers={})---->2my_wn_dataframe.make_map(map_columns=["base demand", "diameter"], output_file='trialCM.html')
34# output_file: path and .html file name for map output.5# map_columns: list of column names in the 'wn_dataframe' to be added as map layers (and automatically to tooltip)~/anaconda3/envs/WNTR-trial3/lib/python3.7/site-packages/criticalityMaps/mapping/df_map.pyinmake_map(self, output_file, map_columns, tooltip_columns, geojson_layers)
122withopen(output_file, 'w') asfp:
123fp.write(j2_env.get_template(
-->124'./templates/dataframe_map_template.html').render(
125node_data=self.node_data,
126node_map_fields=node_map_fields,
~/anaconda3/envs/WNTR-trial3/lib/python3.7/site-packages/jinja2/environment.pyinget_template(self, name, parent, globals)
881ifparentisnotNone:
882name=self.join_path(name, parent)
-->883returnself._load_template(name, self.make_globals(globals))
884885 @internalcode~/anaconda3/envs/WNTR-trial3/lib/python3.7/site-packages/jinja2/environment.pyin_load_template(self, name, globals)
855 ):
856returntemplate-->857template=self.loader.load(self, name, globals)
858ifself.cacheisnotNone:
859self.cache[cache_key] =template~/anaconda3/envs/WNTR-trial3/lib/python3.7/site-packages/jinja2/loaders.pyinload(self, environment, name, globals)
115# first we try to get the source for this template together116# with the filename and the uptodate function.-->117source, filename, uptodate=self.get_source(environment, name)
118119# try to load the code from the bytecode cache if there is a~/anaconda3/envs/WNTR-trial3/lib/python3.7/site-packages/jinja2/loaders.pyinget_source(self, environment, template)
197198returncontents, filename, uptodate-->199raiseTemplateNotFound(template)
200201deflist_templates(self):
TemplateNotFound: ./templates/dataframe_map_template.html
As it looks like, it is not finding the template folder, which is located at:
So, I decided to duplicate that folder (templates) inside the working directory where I start with (just at the side of the jupyter notebook I am running), just in case... So basically, I end up with a folders structure like this:
Even in this case, I get exactly the same error. I also tried moving the directory where I work on with os.chdir() but still the same error in all cases. Not sure what to do.
Important to notice: I created this virtual environment (WNTR-trial3), cloned the WNTR repository and source-installed the WNTR package. Then, I installed Criticalitymaps within this environment (conda list as follows):
Hey, first of all, what an amazing piece of work you did!
I have been trying to use the
make_map
function but it keeps throwing an error from the jinja package:As it looks like, it is not finding the template folder, which is located at:
/Users/macadmin/Desktop/Projects/WNTR Copiapo/Jupyter notebooks/templates/
So, I decided to duplicate that folder (templates) inside the working directory where I start with (just at the side of the jupyter notebook I am running), just in case... So basically, I end up with a folders structure like this:
Even in this case, I get exactly the same error. I also tried moving the directory where I work on with
os.chdir()
but still the same error in all cases. Not sure what to do.Important to notice: I created this virtual environment (WNTR-trial3), cloned the WNTR repository and source-installed the WNTR package. Then, I installed Criticalitymaps within this environment (
conda list
as follows):The text was updated successfully, but these errors were encountered: