MkDocs - fail on build


I have a site built with MkDocs & material theme from squidfunk. Nothing customised:
build command is simply mkdocs build,
base image is Ubuntu Xenail 16.04
runtime python 3.7

requirements.txt has the following:

Today I just amended a couple of the markdown files in my git repo and pushed to github. And the build failed for some reason. No settings were updated, and site has been fine for a few months now. :frowning:

The relevant part of the error I’m getting seems to be this:

File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/utils/", line 223, in normalize_url
path = path_to_url(path or '.')
File "/opt/buildhome/python3.7/lib/python3.7/site-packages/mkdocs/utils/", line 251, in path_to_url
return '/'.join(path.split('\\'))
AttributeError: 'dict' object has no attribute 'split'

Noticed that MkDocs updated to 1.1

Tried setting the requirement to be mkdocs==1.0.4 to test without the update and got a different error:

pkg_resources.VersionConflict: (mkdocs 1.0.4 (/opt/buildhome/python3.7/lib/python3.7/site-packages), Requirement.parse('mkdocs>=1.1'))

My site is

Any help would be appreciated!


Replying to myself (found the solution), in case someone else hits the same problem.

Cause : both MkDocs and the theme I use (Squidfunk/Material for MkDocs) upgraded. I think the breaking change came from the theme.

  • MkDocs updated from 1.0.4 to 1.1
  • Material for MkDocs theme updated from 4.6 to 5.0.1

In my mkdocs.yml file, I have changed the favicon & main theme icon and in the updated theme the folder structure & some file names changed => hence the error split on a directory path.

I updated the logo icon in mkdocs.yml to:

    logo: material/filename

This was previously referring to assets/images/filename.svg => also note that the .svg extension is not in the reference in the config of the updated theme.

ALSO : I updated the requirements.txt file to look like this:


Hope this helps someone!

awesome - thank you so much for coming back and sharing your solution!

I just wanted to chime in and confirm that the problem was in mkdocs-material.
There are breaking changes from 4.x to 5.x which are detailed at

1 Like

The AttributeError is an exception thrown when an object does not have the attribute you tried to access. ‘dict’ object has no attribute ‘split’ error is that you’re trying to call python split function on the dict , and you can’t split dict elements, only a string. The string consists of a sequence of comma-separated bindings.