Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

README.rst fails to render on PyPi [duplicate]

I have a README.rst in my project hosted on GitHub. It renders fine on GitHub but fails to render on PyPi i.e. I see raw content on the PyPi project description page.

I have looked through similar questions and checked the rst format using python setup.py -r and the packages rstcheck & collective.checkdocs, all of which do not throw any errors. There are no relative links or internal links. I am not sure what the problem is here and how I can fix this.

I know this question has been asked many times. I think I have tried all the solutions and they did not work for me and that is why I am asking again.

like image 708
aishpant Avatar asked Mar 05 '18 09:03

aishpant


Video Answer


1 Answers

See my answer at How to ensure that README.rst is valid?

python setup.py check -r -s
running check
warning: Check: :11: (WARNING/2) "raw" directive disabled.

warning: Check: Invalid markup which will not be rendered on PyPI.

error: Please correct your package.

To fix, don't use the raw directive, and instead use image directive with its various attributes:

.. image:: https://plot.ly/~aishpant/1.png?share_key=8mG4JmyySLLYjbjTg7Uy62
   :target: https://plot.ly/~aishpant/1/?share_key=8mG4JmyySLLYjbjTg7Uy62
   :align: center
   :alt: sysfs line plot
   :width: 600px
like image 181
Steve Piercy Avatar answered Sep 20 '22 11:09

Steve Piercy