- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: expected string or bytes-like object in social plugin #5420
Comments
Thanks for reporting! My guess would be that you set |
Thanks for taking a look, Martin! The title hint was a great one, I think I'm much closer to figuring out what's going on. I think there's actually three separate issues here. Issue 1: our mkdocs private fork is out of date Private fork issues?Our fork is out of date: However the compare view does not show anything: These are the latest commits we have: I'm unsure if this is really a problem, but it stops me from using the
Issue 2: strange caching behavior There is something funny going on with the cache. Once I fix Issue 3, then I can build once, but attempting to rebuild results in an error with the stack trace: Traceback
If I remove Issue 3: dealing with titles that include a list So this is where your hint came in very handy. We had front matter defined like this: ---
description: Cool description
title:
- Profiles and Configuration
--- The title being a list is what caused the problem. Once you fix this and re-build, you run into the above caching issue. Steps to reproduce
Output 1 I've added some debug print statements to my local build but otherwise the output should be the same: Expected string or bytes-like object
Output 2: KeyError['Regular'] For some reason, when checking the cache, the social plugin is only detecting KeyError: 'Regular'
It may have something to do with the folder hierarchy:
The Output 3: Successful build Successful build after clearing .cache
Edit: redacted source code. |
Thanks for providing additional details! One thing that is important: you shared potentially private source code (the patched I'll investigate asap. |
I apologize for sharing the social plugin code, I wasn't thinking. I appreciate your editing it out, and I'll keep that in mind for the future 😄 Thanks for looking into this, Martin! |
Okay, so finally found some time to investigate. Problem 1: Private fork – I'm not sure why no changes are shown, but it might be related to deleted files in the upstream repository. At some point, we restructured our actions, so maybe you have files in the repository that are not contained in upstream. A good idea might be to do the merge locally. Problem 2: Cache behavior – this is related to the social plugin only checking the uppermost directory for fonts in the second run (files have been downloaded before). I've fixed this in cb48549 by using a glob. However, I consider this a bandaid. We're actively working on improving the social plugin, making it more flexible and resilient in future versions. For the time being, the mentioned commit fixes the issue. |
9.1.9 is out, including the changes referenced in this issue! 🚀 |
The new social plugin is out, and it manages fonts in a more flexible and stable way, not relying on directories or naming of files. This means, it doesn't suffer from the problems reported here. |
Context
We are using
mkdocs-insiders
with the social plugin. We get an error (which may be related to our docs) but I'm not too sure how to track it down.Bug description
Our Insiders build fails in Netlify with the following stack trace:
I get the same error when running locally:
Related links
Reproduction
I don't know how to create a minimal reproduction for this particular issue, given the information in the stack trace and build logs
Steps to reproduce
Running an Insiders build from https://github.com/PrefectHQ/prefect with
mkdocs.insiders.yml
and thesocial
plugin enabled should reproduce this issue.Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: