rosscdh / mkdocs-markdownextradata-plugin

A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
MIT License
83 stars 18 forks source link

pip install mkdocs-markdownextradata-plugin results in an error #11

Closed shaniR closed 4 years ago

shaniR commented 4 years ago

Installing results in an error. pip install mkdocs-markdownextradata-plugin Collecting mkdocs-markdownextradata-plugin Using cached https://files.pythonhosted.org/packages/71/2d/64f8d3871a69830b07fe184f94b050244b1cd0ff06fa53e25de4997a7dcc/mkdocs-markdownextradata-plugin-0.1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-2ltd1K/mkdocs-markdownextradata-plugin/setup.py", line 27, in long_description=read('README.md'), File "/tmp/pip-build-2ltd1K/mkdocs-markdownextradata-plugin/setup.py", line 8, in read return Path(os.path.join(os.path.dirname(file), fname)).read_text() AttributeError: 'PosixPath' object has no attribute 'read_text'

rosscdh commented 4 years ago

Hi there,

are you using python 2? or python 3?

On Mon, Nov 4, 2019 at 11:55 AM Shani Ranasinghe notifications@github.com wrote:

Installing results in an error. pip install mkdocs-markdownextradata-plugin Collecting mkdocs-markdownextradata-plugin Using cached https://files.pythonhosted.org/packages/71/2d/64f8d3871a69830b07fe184f94b050244b1cd0ff06fa53e25de4997a7dcc/mkdocs-markdownextradata-plugin-0.1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-2ltd1K/mkdocs-markdownextradata-plugin/setup.py", line 27, in long_description=read('README.md'), File "/tmp/pip-build-2ltd1K/mkdocs-markdownextradata-plugin/setup.py", line 8, in read return Path(os.path.join(os.path.dirname(file), fname)).read_text() AttributeError: 'PosixPath' object has no attribute 'read_text'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rosscdh/mkdocs-markdownextradata-plugin/issues/11?email_source=notifications&email_token=AADA6MRIWBY53CAEPX6NIILQR75R5A5CNFSM4JIR2KBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HWR6Q2A, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADA6MVTUYPAL3NBIKLIQYLQR75R5ANCNFSM4JIR2KBA .

rosscdh commented 4 years ago

Made it p2.7 friendly again

as of version 0.1.1 https://pypi.org/project/mkdocs-markdownextradata-plugin/#history

shaniR commented 4 years ago

It didn't work for python3 as well. now it works for python 2. Will check with python 3 and update if the error still is found. Thank you so much.

rosscdh commented 4 years ago

am using/testing on python 3.7 so id be surprised if it doesnt. Thanks for taking the time to lodge the ticket please let me know how it goes

rosscdh commented 4 years ago

https://github.com/aio-libs/aiohttp/issues/3977 as per

pathlib.Path.read_text() should available under Python 3.5+. If you don't have it, your Python installation is probably broken.