Closed Kristinita closed 7 years ago
Thank you for your bug reports, I love how detailed they are.
The reason of this stack trace was this link: http://www.wikireality.ru/wiki/Оффтопик
not being "percent-encoded" before passing it to urlopen
.
@silentlamb , maybe this Stack Overflow answer help you.
Thanks.
@Kristinita I've tested the fix and everything seemed to work properly, but I got two requests if you don't mind.
@silentlamb, after update I get similar stack trace for all my articles and pages. Example:
ERROR: Could not process Sublime-Text\ValeriyaSpeller.md
| TypeError: '>=' not supported between instances of 'NoneType' and 'int'
|___
| Traceback (most recent call last):
| File "c:\python36\lib\site-packages\pelican\generators.py", line 523, in generate_context
| context_sender=self)
| File "c:\python36\lib\site-packages\pelican\readers.py", line 572, in read_file
| context=context)
| File "c:\python36\lib\site-packages\pelican\contents.py", line 153, in __init__
| signals.content_object_init.send(self)
| File "c:\python36\lib\site-packages\blinker\base.py", line 267, in send
| for receiver in self.receivers_for(sender)]
| File "c:\python36\lib\site-packages\blinker\base.py", line 267, in <listcomp>
| for receiver in self.receivers_for(sender)]
| File "D:\Kristinita\pelican-plugins\deadlinks\deadlinks.py", line 183, in content_object_init
| if code >= 400 and code < 500:
| TypeError: '>=' not supported between instances of 'NoneType' and 'int'
See full deadlinks output on Gist — https://gist.github.com/Kristinita/a2be9ec597752c9934f4e68cbd67908d.
Thanks.
Ok, seems like I haven't tested the time out path properly (which is strange because I though I did). The bug occurs because of stupid typo:
availibility = False,
instead of availibility = False
(hopefully...) fixed.
One more thing: I've published two hidden tuning params as these may vary from person to person: timeout duration and flag indicating whether to make each timeout fail (dead links) or just log the fact it was not available (not dead link). By default timeouts are skipped and duration is set to 1000 ms.
This problem fix for me, I close issue.
Thanks for a responsible approach to development!
1. Summary
I get stack trace, if I use deadlinks plugin.
2. Settings
My project — https://github.com/Kristinita/KristinitaPelican,
Nas-Izu.md
file — https://github.com/Kristinita/KristinitaPelican/blob/master/content/Giologica/Nas-Izu.md with Cyrillic symbols.Part of my
pelicanconf.py
file:3. Steps to reproduce
I run command in terminal:
See full output on Gist — https://gist.github.com/Kristinita/63c81829c196afd7dc68cbe5e3dba12a.
4. Expected behavior
Not stack trace.
5. Actual behavior
6. Environment
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Python: 3.6.1 Pelican: 3.7.1 BeautifulSoup4: 4.5.3
Thanks.