Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A arch-wiki-docs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Jakub Klinkovský
  • arch-wiki-docs
  • Issues
  • #31
Closed
Open
Issue created Nov 14, 2022 by Administrator@rootContributor

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'

https://github.com/lahwaacz/arch-wiki-docs/blob/b6c20fdf329187a30f9e1367167601f9a887178d/ArchWiki/optimizer.py#L80-L109

This is a bit confusing because one of the first if statements in that particular function is checking if href is not None.

Assignee
Assign to
Time tracking