Closed Kristinita closed 7 years ago
Hello @Kristinita
Thank you for your great bug report. But unfortunately I couldn't reproduce it.
Could you add --debug
to html
part of your Makefile?
html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) --debug
Then next time you run make html
, you will get more detail of the CRITICAL error. Could you give me that?
i.e. (This is the face. I made changes for the example.)
CRITICAL: AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
File "/usr/local/bin/pelican", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/pelican/__init__.py", line 478, in main
pelican.run()
File "/usr/local/lib/python3.5/dist-packages/pelican/__init__.py", line 183, in run
p.generate_output(writer)
File "/usr/local/lib/python3.5/dist-packages/pelican/generators.py", line 587, in generate_output
self.generate_pages(writer)
File "/usr/local/lib/python3.5/dist-packages/pelican/generators.py", line 488, in generate_pages
self.generate_direct_templates(write)
File "/usr/local/lib/python3.5/dist-packages/pelican/generators.py", line 436, in generate_direct_templates
page_name=os.path.splitext(save_as)[0])
File "/usr/local/lib/python3.5/dist-packages/pelican/writers.py", line 206, in write_file
page.save_as, override_output)
File "/usr/local/lib/python3.5/dist-packages/pelican/writers.py", line 168, in _write_file
signals.content_written.send(path, context=localcontext)
File "/usr/lib/python3/dist-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "/usr/lib/python3/dist-packages/blinker/base.py", line 267, in <listcomp>
for receiver in self.receivers_for(sender)]
File "plugins/replacer/replacer.py", line 19, in replace
s = s.replace(src.decode(), tgt)
AttributeError: 'str' object has no attribute 'decode'
Makefile:65: recipe for target 'html' failed
make: *** [html] Error 1
@narusemotoki, yes, I'm sorry. Also I use Cyrillic symbols in filenames and in content of my pages.
@Kristinita I fixed the bug. I'm sorry, now I understand why I couldn't reproduce the bug last time. It is because I didn't push the latest plugin on GitHub. Now I remember I got same error when I moved to Python3 for Pelican.
@Kristinita I closed this issue, but if you still get the error, let me know.
1. Summary
If I use replacer, I get critical error.
2. Settings
Part of my Makefile:
Part of my
pelicanconf.py
:3. Steps to reproduce
In root folder of my project I run command
make html
.4. Expected behavior
Successful replace
css/personal
→../css/personal
. About reasons see here.5. Actual behavior
If I disable replacer in my
pelicanconf.py
, I don't get actual behavior, I successful build my site.6. Environment
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Python: 3.6.1 Pelican: 3.7.1 Make for Windows: 4.2
Thanks.