getpelican/pelican-plugins

Sitemap - TypeError: can't compare offset-naive and offset-aware datetimes on 3.4 or upper

luzfcb opened this issue · 3 comments

Sitemap - TypeError: can't compare offset-naive and offset-aware datetimes on 3.4 or upper when trying to generate the https://github.com/pythonclub/pythonclub.github.io

CRITICAL: ("can't compare offset-naive and offset-aware datetimes",)                                                                                     
CRITICAL: can't compare offset-naive and offset-aware datetimes                                                                                          
Traceback (most recent call last):                                                                                                                       
  File "/home/oficina/1VirtualEnvs/pyclub_3.5/bin/pelican", line 9, in <module>                                                                          
    load_entry_point('pelican==3.4.0', 'console_scripts', 'pelican')()                                                                                   
  File "/home/oficina/1VirtualEnvs/pyclub_3.5/local/lib/python2.7/site-packages/pelican/__init__.py", line 393, in main                                  
    pelican.run()                                                                                                                                        
  File "/home/oficina/1VirtualEnvs/pyclub_3.5/local/lib/python2.7/site-packages/pelican/__init__.py", line 173, in run                                   
    p.generate_output(writer)                                                                                                                            
  File "/home/oficina/Desktop/pythonclub.github.io/plugins/sitemap/sitemap.py", line 188, in generate_output                                             
    self.set_url_wrappers_modification_date(self.context['categories'])                                                                                  
  File "/home/oficina/Desktop/pythonclub.github.io/plugins/sitemap/sitemap.py", line 171, in set_url_wrappers_modification_date                          
    lastmod = max(lastmod, article.date)                                                                                                                 
TypeError: can't compare offset-naive and offset-aware datetimes                                                                                         

Same here, that seems to be a know problem, Sitemap needs an update :
https://botbot.me/freenode/pelican/msg/19638759/

cc @avaris

Fix modified datetime offset-naive bug #311

I believe this has been addressed. If that is not the case, please feel free to comment here and I will reopen this issue.