Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to work with mkdocs 1.5 #1

Closed
Moulick opened this issue Aug 6, 2023 · 10 comments · Fixed by #2
Closed

Upgrade to work with mkdocs 1.5 #1

Moulick opened this issue Aug 6, 2023 · 10 comments · Fixed by #2

Comments

@Moulick
Copy link

Moulick commented Aug 6, 2023

Since mkdocs 1.5 has been released, can you please upgrade the dependency. I would submit a PR but I tried doing it locally but run into errors. I don't know enough about mkdocs to debug 😞

ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /images/kroki_generated/Tips%20%26%20Tricks-71c25a34c7a0ef962e56753a840cd334.svg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x108daf1d0>: Failed to establish a new connection: [Errno 61] Connection refused'))

Local test logs
INFO    -  Building documentation...
INFO    -  kroki.plugin Configuring: {'ServerURL': 'https://kroki.io', 'EnableBlockDiag': True, 'Enablebpmn': True, 'EnableExcalidraw': True,
         'EnableMermaid': True, 'EnableDiagramsnet': True, 'HttpMethod': 'POST', 'DownloadImages': True, 'EmbedImages': False, 'DownloadDir':
         'images/kroki_generated', 'FencePrefix': 'kroki-', 'FileTypes': ['svg'], 'FileTypeOverrides': {}}
INFO    -  kroki.config File and Diagram types configured: {'bytefield': 'svg', 'ditaa': 'svg', 'erd': 'svg', 'graphviz': 'svg', 'nomnoml': 'svg',
         'plantuml': 'svg', 'structurizr': 'svg', 'c4plantuml': 'svg', 'svgbob': 'svg', 'vega': 'svg', 'vegalite': 'svg', 'wavedrom': 'svg',
         'pikchr': 'svg', 'umlet': 'svg', 'd2': 'svg', 'blockdiag': 'svg', 'seqdiag': 'svg', 'actdiag': 'svg', 'nwdiag': 'svg', 'packetdiag': 'svg',
         'rackdiag': 'svg', 'bpmn': 'svg', 'excalidraw': 'svg', 'mermaid': 'svg', 'diagramsnet': 'svg'}
INFO    -  kroki.client Initialized: POST, https://kroki.io
INFO    -  [INLINE_SVG] Configuring: {'AltName': 'Kroki', 'IncludeAssets': False, 'AssetDir': 'assets/', 'PatchStyle': False}
INFO    -  Cleaning site directory
INFO    -  An absolute path to '/...' is included in the 'nav' configuration, which presumably points to an external resource.
INFO    -  kroki.plugin reading kroki block from file: "/Users/moulick.aggarwal/redacted/redacted/redacted/docs/diag/file.excalidraw"
ERROR   -  Error reading page 'Tips & Tricks.md': HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url:
         /images/kroki_generated/Tips%20%26%20Tricks-71c25a34c7a0ef962e56753a840cd334.svg (Caused by
         NewConnectionError('<urllib3.connection.HTTPConnection object at 0x108daf1d0>: Failed to establish a new connection: [Errno 61] Connection
         refused'))

ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /images/kroki_generated/Tips%20%26%20Tricks-71c25a34c7a0ef962e56753a840cd334.svg (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x108daf1d0>: Failed to establish a new connection: [Errno 61] Connection refused'))

PS: Thank you for the plugin!

@oniboni
Copy link
Owner

oniboni commented Aug 7, 2023

Thank you for the issue!

I've just removed the version pinning, bc it does not make any sense on this side as a middleware package without any tests (yet!) 😐
I've also tested it with the current versions. Seems fine on my end. Feel free to raise another issue, if it does not work. And of course I would be glad, if you could confirm, that /this/ issue is solved for you! 🐈

@Moulick
Copy link
Author

Moulick commented Aug 8, 2023

Thank you for taking this into consideration. But ermm, 19ebfc6#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R25 is still pinning it to <= 1.4.2

image

I think something like this below makes sense. Pinning it to just the major versions. Requests and beautifulsoup are so well established that I don't think there will ever be a breaking change within a minor version. Mkdocs definitely does breaking within minor versions but probably best left up to the end-user to pin in their own dependencies

dependencies = [
  "mkdocs",
  "requests == 2.*",
  "beautifulsoup4 == 4.*",
]

@oniboni
Copy link
Owner

oniboni commented Aug 8, 2023

OMG, you are completely right! Wasn't that focused yesterday night... 😵‍💫

Just fixed it now. Sorry for the inconvenience!

@Moulick
Copy link
Author

Moulick commented Aug 8, 2023

Hahaha happens to us all, thank you for the change

I get this error, not sure why

image

@Moulick
Copy link
Author

Moulick commented Aug 10, 2023

Any idea @oniboni?

@oniboni
Copy link
Owner

oniboni commented Sep 14, 2023

Sorry for the late reply. I will try to reproduce this and find a solution.

@Moulick
Copy link
Author

Moulick commented Jan 1, 2024

@oniboni did you ever get around to checking this please?

@oniboni
Copy link
Owner

oniboni commented Jan 3, 2024

Yes, I did. Sadly, I also had to fix stuff in the underlying mkdocs-kroki-plugin which seems to be abandoned.

I couldn't bring myself yet to forking this as an own package, but maybe will do..

Sorry for the inconvenience..

@Moulick
Copy link
Author

Moulick commented Jan 4, 2024

Oh I see, Thank you for your work!

@Moulick
Copy link
Author

Moulick commented Jan 18, 2024

Got merged 😉

@oniboni oniboni linked a pull request Apr 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants