'Azure DevOps - pip ValueError: HTML doctype missing or incorrect
I have created a package feed in Azure DevOps. Everything was working until pip version 22.0 was released.
Now when I try to install package from this feed using pip==22.0
File "c:\git_aures_aps\projects\venvs\aures_tools_test_p\lib\site-packages\pip\_internal\index\collector.py", line 427, in _raise_error
"HTML doctype missing or incorrect. Expected <!DOCTYPE html>.\n\n"
ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.
When I have checked https://pkgs.dev.azure.com/.../_packaging/.../pypi/simple/my-package/ I have found that the website doesn't start with <!DOCTYPE HTML>
How can I edit / recreate, pypi/simple/my-package repository with <!DOCTYPE HTML> tag?
Solution 1:[1]
You can not change it yourself unfortunately, the Azure DevOps team at Microsoft has to do it on their end. There is an open request on Developer Community, where the engineering team is already looking into it, so follow up here: https://developercommunity.visualstudio.com/t/azure-artifacts-pypi-feed-index-misses-html-doctyp/1667879
For now, you may pass --use-deprecated=html5lib until pip 22.2 (i.e. start of Q3 2022), when this flag will be dropped, as stated in the link by pradyunsg.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alexander Kvist |

