[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
Yet my output does not compile it, there is just the logo and the menu, and the header is "post-head no-cover". Le mercredi 13 mai 2020 10:59:50 UTC+2, Julien Vallet a écrit : > > Hi, > > > I have trouble with the replacement of an old theme. > > When building under a new theme (canterville), I get a > > > __M_writer(str(post.meta('banner'))) > AttributeError: 'Undefined' object has no attribute 'meta' > > > render_galleries:output/galleries/index.html : > > > Maybe its because I misused conf.py ? > > > GLOBAL_CONTEXT = { >"BANNER_URL": '/assets/img/oeil.jpg', > > } > > > Yet I've been careful with the Global_context location... > > > Or in my template ? > > > > % if 'main_index' in pagekind: > > % else: > > % else: > > % endif > > > Can you help me ? > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/a5a03637-448e-4923-8ded-948034f88c80%40googlegroups.com.
[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
It worked just fine thanks ! I had changed the base.tmpl trying to impose the banner. Now the site works well, but I'm still in struggle with the metadata, yet I think I have set the global context at the right place and tried numerous possibilities to set the pagekind to main_index and BANNER_URL. Did the banner opened when you build it ? Le mercredi 13 mai 2020 10:59:50 UTC+2, Julien Vallet a écrit : > > Hi, > > > I have trouble with the replacement of an old theme. > > When building under a new theme (canterville), I get a > > > __M_writer(str(post.meta('banner'))) > AttributeError: 'Undefined' object has no attribute 'meta' > > > render_galleries:output/galleries/index.html : > > > Maybe its because I misused conf.py ? > > > GLOBAL_CONTEXT = { >"BANNER_URL": '/assets/img/oeil.jpg', > > } > > > Yet I've been careful with the Global_context location... > > > Or in my template ? > > > > % if 'main_index' in pagekind: > > % else: > > % else: > > % endif > > > Can you help me ? > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/30d378ed-0a7d-4752-ba9c-b9f1cafefdb4%40googlegroups.com.
Re: [nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
Can I send you the context ? What would you need ? I'm just at the end of the rope Le mercredi 13 mai 2020 12:08:20 UTC+2, Roberto Alsina a écrit : > > The template has no "post", you only have it inside that loop, after the > line > > % for post in posts: > > I am guessing the call to post.meta that's failing is outside that. > Trying to explain how to fix that without context is difficult, but you > just can't use post anywhere outside that loop. > > > On Wed, May 13, 2020 at 6:49 AM Julien Vallet > wrote: > >> Yet there is a block for articles no ? >> >> >> % for post in posts: >> >> >> >> >> >> ${post.title()|h} >> >> %if index_teasers: >> >> ${post.text(teaser_only=True)} >> %else: >> >> ${post.text(teaser_only=False)} >> %endif >> >> >> % if author_pages_generated: >> >> ${post.author()|h} >> % else: >> ${post.author()|h} >> % endif >> >> on >> % for tag in post.tags: >> #${tag}, >> % endfor >> >> > "${post.formatted_date('webiso')}"> >> ${post.formatted_date(date_format)|h} >> >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nikola-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to nikola-...@googlegroups.com . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/nikola-discuss/679cfc08-d74f-42c7-8879-ad068a6313a1%40googlegroups.com >> >> <https://groups.google.com/d/msgid/nikola-discuss/679cfc08-d74f-42c7-8879-ad068a6313a1%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/a00346ef-7535-4d4d-beca-d013e6fd8236%40googlegroups.com.
[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
Yet there is a block for articles no ? % for post in posts: ${post.title()|h} %if index_teasers: ${post.text(teaser_only=True)} %else: ${post.text(teaser_only=False)} %endif % if author_pages_generated: ${post.author()|h} % else: ${post.author()|h} % endif on % for tag in post.tags: #${tag}, % endfor ${post.formatted_date(date_format)|h} -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/679cfc08-d74f-42c7-8879-ad068a6313a1%40googlegroups.com.
[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
Sorry, my english is too bad. How can I do that ? -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/34142c92-d8f5-4d7b-a9b7-79eb10952992%40googlegroups.com.
[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
Sorry but what does it mean ? -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/735b4e1f-8207-45d6-8e43-9ba57e4e77d1%40googlegroups.com.
[nikola-discuss] Re: AttributeError: 'Undefined' object has no attribute 'meta'
It has three posts and it's the index template. Le mercredi 13 mai 2020 10:59:50 UTC+2, Julien Vallet a écrit : > > Hi, > > > I have trouble with the replacement of an old theme. > > When building under a new theme (canterville), I get a > > > __M_writer(str(post.meta('banner'))) > AttributeError: 'Undefined' object has no attribute 'meta' > > > render_galleries:output/galleries/index.html : > > > Maybe its because I misused conf.py ? > > > GLOBAL_CONTEXT = { >"BANNER_URL": '/assets/img/oeil.jpg', > > } > > > Yet I've been careful with the Global_context location... > > > Or in my template ? > > > > % if 'main_index' in pagekind: > > % else: > > % else: > > % endif > > > Can you help me ? > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/0d3c44d3-685d-426c-845b-13918cd9c2e7%40googlegroups.com.
[nikola-discuss] AttributeError: 'Undefined' object has no attribute 'meta'
Hi, I have trouble with the replacement of an old theme. When building under a new theme (canterville), I get a __M_writer(str(post.meta('banner'))) AttributeError: 'Undefined' object has no attribute 'meta' render_galleries:output/galleries/index.html : Maybe its because I misused conf.py ? GLOBAL_CONTEXT = { "BANNER_URL": '/assets/img/oeil.jpg', } Yet I've been careful with the Global_context location... Or in my template ? % if 'main_index' in pagekind: % else: % else: % endif Can you help me ? -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/18d436ab-0fe6-45d2-bfdf-f47768b6a729%40googlegroups.com.
[nikola-discuss] Re: Theme don't want to update
Thanks a lot. I didn't know .doit.db was hidden, the trick worked. Sorry for the repetition. Le mardi 5 mai 2020 13:55:18 UTC+2, Julien Vallet a écrit : > > Hi again, > > Since I've updated Nikola, all goes wrong. And since I'm really bad to > coding, it's a mess. > There's still the dbm.gnu module that doesn't want to go available (I > tried to delete doit but I'm not sure I have delete the good one... I have > deleted the cache file, but none of this is working). > I was thinking that might comes from the fact that I don't work with a git > repo (my mac is 10.7.5 and I don't understand how it works). > The site is opening but the backend seems to block any frontend > modification. Do you see something ? > > [2020-05-05T13:47:07Z] ERROR: auto: Scanning posts.done! > Traceback (most recent call last): > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", > > line 156, in __init__ > self._dbm = ddbm.open(self.name, 'c') > File > "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dbm/__init__.py", > > line 91, in open > "available".format(result)) > dbm.error: db type is dbm.gnu, but the module is not available > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/doit_cmd.py", > line 190, in run > return command.parse_execute(args) > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/cmd_base.py", > line 150, in parse_execute > return self.execute(params, args) > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/cmd_base.py", > line 580, in execute > codec_cls=codec_cls) > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", > > line 503, in __init__ > self.backend = db_class(backend_name, codec=codec_cls()) > File > "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", > > line 171, in __init__ > raise DatabaseException(message) > doit.dependency.DatabaseException: db type is dbm.gnu, but the module is > not available > > This is a catastrophy. Any help would be appreciated ! Thanks !! > -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/26c1583f-9a0e-4e56-9d8a-d1be459ac765%40googlegroups.com.
[nikola-discuss] Theme don't want to update
Hi again, Since I've updated Nikola, all goes wrong. And since I'm really bad to coding, it's a mess. There's still the dbm.gnu module that doesn't want to go available (I tried to delete doit but I'm not sure I have delete the good one... I have deleted the cache file, but none of this is working). I was thinking that might comes from the fact that I don't work with a git repo (my mac is 10.7.5 and I don't understand how it works). The site is opening but the backend seems to block any frontend modification. Do you see something ? [2020-05-05T13:47:07Z] ERROR: auto: Scanning posts.done! Traceback (most recent call last): File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", line 156, in __init__ self._dbm = ddbm.open(self.name, 'c') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dbm/__init__.py", line 91, in open "available".format(result)) dbm.error: db type is dbm.gnu, but the module is not available During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/doit_cmd.py", line 190, in run return command.parse_execute(args) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/cmd_base.py", line 150, in parse_execute return self.execute(params, args) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/cmd_base.py", line 580, in execute codec_cls=codec_cls) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", line 503, in __init__ self.backend = db_class(backend_name, codec=codec_cls()) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/dependency.py", line 171, in __init__ raise DatabaseException(message) doit.dependency.DatabaseException: db type is dbm.gnu, but the module is not available This is a catastrophy. Any help would be appreciated ! Thanks !! -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/ca6cc6ac-8146-49a2-a88b-dae17dd4fbef%40googlegroups.com.
[nikola-discuss] Unknown path request of kind
Hi, I apologize in advance for this weird request, but I just don't understand a word in what terminal returns me when I try to build Nikola since I've updated it to V8. Here's the thing : (nikola_env) julien:nikola annebitran$ nikola build [2020-04-30T17:45:06Z] WARNING: Nikola: The UNSLUGIFY_TITLES setting was renamed to FILE_METADATA_UNSLUGIFY_TITLES. [2020-04-30T17:45:06Z] WARNING: Nikola: The TAG_PAGES_DESCRIPTIONS setting was renamed to TAG_DESCRIPTIONS. Scanning posts.done! . render_galleries:output/galleries/index.html [2020-04-30T17:45:15Z] WARNING: Nikola: Unknown path request of kind: TaskError - taskid:render_galleries:output/galleries/index.html PythonAction Error Traceback (most recent call last): File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/doit/action.py", line 437, in execute returned_value = self.py_callable(*self.args, **kwargs) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/nikola/plugins/task/galleries.py", line 701, in render_gallery_index self.site.render_template(template_name, output_name, context) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/nikola/nikola.py", line 1373, in render_template template_name, None, local_context) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/nikola/plugins/template/jinja.py", line 96, in render_template data = template.render(**context) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render self.environment.handle_exception() File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception reraise(*rewrite_traceback_stack(source=source)) File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise raise value.with_traceback(tb) File "themes/remouleurs/templates/gallery.tmpl", line 4, in top-level template code {% import 'crumbs.tmpl' as ui with context %} File "themes/remouleurs/templates/base.tmpl", line 70, in top-level template code {{ base.late_load_js() }} File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/jinja2/runtime.py", line 679, in _invoke rv = self._func(*arguments) File "themes/remouleurs/templates/base_helper.tmpl", line 95, in template {% if colorbox_locales[lang] %} File "/Users/annebitran/nikola_env/lib/python3.7/site-packages/jinja2/environment.py", line 452, in getitem return obj[argument] jinja2.exceptions.UndefinedError: 'colorbox_locales' is undefined render_galleries:output/galleries/index.html : What's happening ? It seems that there are some color missing somewhere ? A gallery hidden underground ? Thanks !! -- You received this message because you are subscribed to the Google Groups "nikola-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/ff9bf79b-649b-4736-9f43-ed5579f4534a%40googlegroups.com.