TypeError in update_links()
Created by: grawlinson
Well, this is definitely a weird one...
When updating the arch-wiki-docs
package to the latest commit (b6c20fd
from 216a217
), I'm getting a TypeError that throws this:
==> Starting prepare()...
Downloading CSS...
ArchWikiOffline.css
Available namespaces:
-2 -- Media
-1 -- Special
0 -- Main
1 -- Talk
2 -- User
3 -- User talk
4 -- ArchWiki
5 -- ArchWiki talk
6 -- File
7 -- File talk
8 -- MediaWiki
9 -- MediaWiki talk
10 -- Template
11 -- Template talk
12 -- Help
13 -- Help talk
14 -- Category
15 -- Category talk
3000 -- DeveloperWiki
3001 -- DeveloperWiki talk
Processing namespace 0...
[skipping] .NET
[downloading] .NET Core (Español)
Traceback (most recent call last):
File "/build/arch-wiki-docs/src/arch-wiki-docs/arch-wiki-docs.py", line 41, in <module>
downloader.process_namespace(ns)
File "/build/arch-wiki-docs/src/arch-wiki-docs/ArchWiki/downloader.py", line 96, in process_namespace
text = self.optimizer.optimize(fname, r.text)
File "/build/arch-wiki-docs/src/arch-wiki-docs/ArchWiki/optimizer.py", line 31, in optimize
self.update_links(root, relbase)
File "/build/arch-wiki-docs/src/arch-wiki-docs/ArchWiki/optimizer.py", line 102, in update_links
href += "#" + fragment
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
This is a bit confusing because one of the first if
statements in that particular function is checking if href
is not None.