jimporter / mike

Manage multiple versions of your MkDocs-powered documentation via Git
BSD 3-Clause "New" or "Revised" License
511 stars 45 forks source link

Error: "KeyError(<LooseVersion('v0.8.2')>) does not exist" when I'm pretty sure the tag/release/branch exist #163

Closed swcurran closed 1 year ago

swcurran commented 1 year ago

Summary

I have a repo with a branch per Release of an open source project's documentation, and am using Mike to handle the versioning. My process is the same for each release:

When I create the current version (0.8.2), I get the following error on the Mike deploy (mike deploy --push --update-aliases $VERSION $ALIAS), with $VERSION and $ALIAS confirmed to be v0.8.2 and 0.8.2.

error: version KeyError(<LooseVersion('v0.8.2')>) does not exist

From what I can see the tag and branch exist as expected, same as 0.8.1 and I'm stumped. Any suggestions?

Thanks!!!

Configuration and Logs

GHA Links for the failed 0.8.2 and passing 0.8.1

Steps to Reproduce

Process to trigger GHA listed above -- same steps run several to confirm identical between the last two versions of the docs.

Expected Behavior

Additional Context

jimporter commented 1 year ago

mike delete will fail if the version you specify doesn't exist (edit: "exist" here means that the docs for that version are actually deployed, i.e. that it's in versions.json and shows up in mike list). Is there a reason you need to delete it before redeploying?

The only difference between mike deploy $VERSION and mike delete $VERSION; mike deploy $VERSION is that the former would erase any aliases that $VERSION previously had, but it's pretty rare that you'd need to do that.

(There's also the related issue that it's printing the error message in a funny way, but that's just a display bug.)

swcurran commented 1 year ago

Thank you!!! That was a thing I added (but didn’t remove) when I last asked a question about this.

Sorry about that! Much appreciated.

swcurran commented 1 year ago

All fixed!! Thanks again -- much appreciated!