Search code examples
python-3.xazure-devopspip

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>

enter image description here

How can I edit / recreate, pypi/simple/my-package repository with <!DOCTYPE HTML> tag?


Solution

  • Please look at the rest of the error message.

    ValueError: HTML doctype missing or incorrect. Expected <!DOCTYPE html>.
    
    If you believe this error to be incorrect, try passing the command line option --use-deprecated=html5lib and please leave a comment on the pip issue at https://github.com/pypa/pip/issues/10825.
    

    It takes you to https://github.com/pypa/pip/issues/10825, which has relevant guidance and information. It also notes that you can pass --use-deprecated=html5lib to pip, to make it work with this page for now.

    As for Azure, you're going to need to reach out to Azure support in all likelihood, since they need to fix this on their end IIUC.