-3

I have downloaded some sample tpl files from the internet, i wanted to customise menu on my site thus i was trying to create new base.tpl file. However when I have saved it bottle does not want to read it and and return that:

bottle.TemplateError: Template 'base.tpl' not found.

Strange thing is that one is percived as rtf file and the other one (base.tpl downloaded from the internet) as the exec file. Why is that and how to fix this? Screenshot bellow:

enter image description here

I am referring to them with: return template('base'). My educated guess is that it is textedit problem (I am using macOS) as it is trying to interpret the file and does not show the real html/tpl content.

Templates are regular bottle tpl files, nothing extraordinary they are saved in my project directory.

As to the directory list

enter image description here

However what I did is downloaded a different text editor then TextEdit and opened it in both in TextEdit you have:

enter image description here

Whereas in Atom text editor it looks like this:

enter image description here

Nevertheless files that were not created in TextEdit work perfectly fine.

mkropkowski
  • 107
  • 8
  • Unfortunately, we can't write the missing information into your question. What templates? Where did you save them? How are you trying to read them? – tripleee Jan 10 '19 at 09:58
  • The problem description sounds vaguely like your browser didn't actually download the correct files, and/or gave them the wrong names, and your OS doesn't show the full information to troubleshoot this either. Try to bring up a file listing from the command prompt. – tripleee Jan 10 '19 at 10:01
  • I have improved on my question. – mkropkowski Jan 10 '19 at 10:58
  • There is still no trace of any actual troubleshooting attempt. In the Terminal, type `ls -l` and see what the actual file names are. In the question, show us what `tempate('base')` refers to and demonstrate that this is actually the directory which contains a file with that name. – tripleee Jan 10 '19 at 11:02
  • 1
    In so many words, if the computer says "this file does not exist" and you say "but it does", which of the two do you think we will believe? Nothing personal, just that solid experience nudges us towards believing the computer. Show us how the computer is wrong and we have something to talk about at least. – tripleee Jan 10 '19 at 11:03
  • I think I found a reason for this error - see my update. – mkropkowski Jan 10 '19 at 11:09

1 Answers1

0

Problem was with how the TextEdit perceived .tpl files changing text editor has helped files created via any other editor than TextEdit were interpreted correctly.

mkropkowski
  • 107
  • 8