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

Can not launch after itsdangerous's new release #59

Closed
cbjornram opened this issue Feb 18, 2022 · 8 comments · Fixed by #60
Closed

Can not launch after itsdangerous's new release #59

cbjornram opened this issue Feb 18, 2022 · 8 comments · Fixed by #60

Comments

@cbjornram
Copy link

I'm running Docnado in a docker container, and as part of the building process I'm running pip install docnado --upgrade && docnado --new. However after itsdangerous's new release (released yesterday) this now results in the following error:

Collecting docnado
  Downloading docnado-1.0.11-py3-none-any.whl (5.8 MB)
Collecting Frozen-Flask==0.15
  Downloading Frozen_Flask-0.15-py2.py3-none-any.whl (20 kB)
Collecting beautifulsoup4==4.9.0
  Downloading beautifulsoup4-4.9.0-py3-none-any.whl (109 kB)
Collecting Flask==1.1.2
  Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting watchdog==0.10.2
  Downloading watchdog-0.10.2.tar.gz (95 kB)
Collecting requests==2.23.0
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting Markdown==2.6.11
  Downloading Markdown-2.6.11-py2.py3-none-any.whl (78 kB)
Collecting soupsieve>1.2
  Downloading soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting click>=5.1
  Downloading click-8.0.3-py3-none-any.whl (97 kB)
Collecting Werkzeug>=0.15
  Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
Collecting Jinja2>=2.10.1
  Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting itsdangerous>=0.24
  Downloading itsdangerous-2.1.0-py3-none-any.whl (15 kB)
Collecting idna<3,>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting pathtools>=0.1.1
  Downloading pathtools-0.1.2.tar.gz (11 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Building wheels for collected packages: watchdog, pathtools
  Building wheel for watchdog (setup.py): started
  Building wheel for watchdog (setup.py): finished with status 'done'
  Created wheel for watchdog: filename=watchdog-0.10.2-py3-none-any.whl size=73631 sha256=7d2fa836f436cfea094aa51eca18e325050629ecea1ac463a5c0936ff12f50a4
  Stored in directory: /root/.cache/pip/wheels/b3/36/be/039395ce111986ccf0c014030f7b7a2e983d73b5f9250e5dfe
  Building wheel for pathtools (setup.py): started
  Building wheel for pathtools (setup.py): finished with status 'done'
  Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8806 sha256=355c91c5e08b74faf770cd0f0cb9edc7557d2f90e3fe26bdab182d21555a01be
  Stored in directory: /root/.cache/pip/wheels/e7/f3/22/152153d6eb222ee7a56ff8617d80ee5207207a8c00a7aab794
Successfully built watchdog pathtools
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, click, urllib3, soupsieve, pathtools, idna, Flask, chardet, certifi, watchdog, requests, Markdown, Frozen-Flask, beautifulsoup4, docnado
Successfully installed Flask-1.1.2 Frozen-Flask-0.15 Jinja2-3.0.3 Markdown-2.6.11 MarkupSafe-2.1.0 Werkzeug-2.0.3 beautifulsoup4-4.9.0 certifi-2021.10.8 chardet-3.0.4 click-8.0.3 docnado-1.0.11 idna-2.10 itsdangerous-2.1.0 pathtools-0.1.2 requests-2.23.0 soupsieve-2.3.1 urllib3-1.25.11 watchdog-0.10.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/bin/docnado", line 5, in <module>
    from docnado.docnado import main
  File "/usr/local/lib/python3.10/site-packages/docnado/docnado.py", line 37, in <module>
    from flask import Flask, url_for, abort, send_from_directory, \
  File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 19, in <module>
    from . import json
  File "/usr/local/lib/python3.10/site-packages/flask/json/__init__.py", line 15, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.10/site-packages/itsdangerous/__init__.py)

If the issue is the same as pallets/itsdangerous#289 and pallets/itsdangerous#290 there seems to be an incompatibility with the Flask version used by Docnado. If so, could Flask be updated? That is if Flask actually is the issue here.

I haven't been able to test this with a native install (non-containerised) because my pip install of docnado fails. I don't think it's related, but I'm quite sure that native installs will have the same problem as described above.

Thank you for this great and easy to set up documentation tool!

Best regards,
Christoffer

@wilad
Copy link
Contributor

wilad commented Feb 18, 2022

Thank you for your detailed bug report.

I have replicated this issue and created a fix. This is solved in version '1.0.12'.

  • wilad

@cbjornram
Copy link
Author

Hi again,

Thanks for the very fast fix and reply. A short follow-up question: How long does it usually take before the updated version (1.0.12) is available through pip?

All the best,
Christoffer

@wilad
Copy link
Contributor

wilad commented Feb 21, 2022

It's usually updated quite soon after the pull request has been merged. Most likely tomorrow.
If you have any more questions or feeback be sure to let me know.

Wilad

@cbjornram
Copy link
Author

Sounds great. Many thanks Wilad!

Christoffer

@cbjornram
Copy link
Author

Hi again,

I just tried it again, and even when the new Docnado 1.0.12 is being pulled during container build I see in the logs that it still pulls Flask 1.1.2 (instead of 1.1.4), which makes it fail. I found this line and wonder if this also needs to be manually updated:

'Flask==1.1.2',

I would make a PR, but since I am not sure about this I wanted to ask you here instead.

Best regards,
Christoffer

@wilad
Copy link
Contributor

wilad commented Feb 22, 2022

You're completley right. Thanks for your patience. I'll resolve this asap.

@wilad
Copy link
Contributor

wilad commented Feb 22, 2022

New version 1.0.13 should have resolved this for you.

  • Wilad

@cbjornram
Copy link
Author

cbjornram commented Feb 22, 2022

Glad to hear, and now it works perfectly. Thank you for your quick replies and fixes!

Christoffer

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