Yeah... I know... eDonkey? Who cares! :p
Anyway, I have an old post with a presumably dead eD2k link, and I really don't care about it (I replaced it with a link to the same content on YouTube), but maybe this happens with other not-so-common URI schemes, and it's worth a look. If it isn't... please feel free to ignore me :) Maybe even urllib doesn't know about eD2k URIs nowadays...
This reST content:
```
.. title: eD2k Link Test
.. slug: ed2k-link-test
.. date: 2015-05-06 15:25:58 UTC
.. tags:
.. category:
.. link:
.. description:
.. type: text
Here is an `eD2k link`_
.. _eD2k link: ed2k://|file|Audio Book - Orson Welles - War Of The Worlds, Original, Uncut.mp3|54878208|B7E6517C258F0062832629718E91FFBC|/
```
Fails to build with this error:
"""
(nikola)mariano@arya:~/Devel/test⟫ nikola build
Scanning posts....done!
. render_sources:output/posts/ed2k-link-test.rst
. render_posts:cache/posts/ed2k-link-test.html
. render_indexes:output/index.html
########################################
TaskError - taskid:render_indexes:output/index.html
PythonAction Error
Traceback (most recent call last):
File "/home/mariano/.virtualenvs/nikola/lib/python3.4/site-packages/doit/action.py", line 372, in execute
returned_value = self.py_callable(*self.args, **kwargs)
File "/home/mariano/.virtualenvs/nikola/lib/python3.4/site-packages/nikola/nikola.py", line 968, in render_template
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']))
File "/home/mariano/.virtualenvs/nikola/lib/python3.4/site-packages/lxml/html/__init__.py", line 483, in rewrite_links
new_link = link_repl_func(link.strip())
File "/home/mariano/.virtualenvs/nikola/lib/python3.4/site-packages/nikola/nikola.py", line 968, in <lambda>
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, context['lang']))
File "/home/mariano/.virtualenvs/nikola/lib/python3.4/site-packages/nikola/nikola.py", line 1016, in url_replacer
dst_url.fragment))
File "/usr/lib/python3.4/urllib/parse.py", line 393, in urlunsplit
_coerce_args(*components))
File "/usr/lib/python3.4/urllib/parse.py", line 109, in _coerce_args
raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments
https://example.com/index.htmlhttps://example.com/ed2k://%7Cfile%7CAudioBook-OrsonWelles-WarOfTheWorlds,Original,Uncut.mp3%7C54878208%7CB7E6517C258F0062832629718E91FFBC%7C/
"""
This is Nikola 7.4.0, on Python 3.4.0, lxml 3.4.4, doit 0.28.0
Please, let me know if I should file this in GitHub or in /dev/null ;-)
--
Mariano