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

'pip install' does not include Sanity dependency #123

Open
Silthanis opened this issue Jan 9, 2022 · 4 comments
Open

'pip install' does not include Sanity dependency #123

Silthanis opened this issue Jan 9, 2022 · 4 comments

Comments

@Silthanis
Copy link

Attempting to install on Debian 11 "Bullseye" with Python 3.9:

$ virtualenv temboz
created virtual environment CPython3.9.2.final.0-64 in 201ms
creator CPython3Posix(dest=/home/user/.apps/temboz, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/user/.local/share/virtualenv)
added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
$ cd temboz
$ chmod +x bin/activate
$ bin/activate
$ pip install temboz
Collecting temboz
Using cached temboz-4.5.5-py3-none-any.whl
Collecting bleach>=3.2.1
Using cached bleach-4.1.0-py2.py3-none-any.whl (157 kB)
Collecting yappi
Using cached yappi-1.3.3-cp39-cp39-linux_x86_64.whl
Collecting werkzeug>=1.0.1
Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB)
Collecting feedparser>=6.0.2
Using cached feedparser-6.0.8-py3-none-any.whl (81 kB)
Collecting ctranslitcodec
Using cached ctranslitcodec-0.2.1-cp39-cp39-linux_x86_64.whl
Collecting html5lib>=1.1
Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting argon2-cffi
Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting passlib
Using cached passlib-1.7.4-py2.py3-none-any.whl (525 kB)
Collecting flask
Using cached Flask-2.0.2-py3-none-any.whl (95 kB)
Collecting sgmllib3k
Using cached sgmllib3k-1.0.0-py3-none-any.whl
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting webencodings
Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting six>=1.9.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting argon2-cffi-bindings
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
Collecting cffi>=1.0.1
Using cached cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (444 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting Jinja2>=3.0
Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting click>=7.1.2
Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting itsdangerous>=2.0
Using cached itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.10-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Installing collected packages: pycparser, pyparsing, MarkupSafe, cffi, werkzeug, webencodings, urllib3, six, sgmllib3k, packaging, Jinja2, itsdangerous, idna, click, charset-normalizer, certifi, argon2-cffi-bindings, yappi, requests, passlib, html5lib, flask, feedparser, ctranslitcodec, bleach, argon2-cffi, temboz
Successfully installed Jinja2-3.0.3 MarkupSafe-2.0.1 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 bleach-4.1.0 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.10 click-8.0.3 ctranslitcodec-0.2.1 feedparser-6.0.8 flask-2.0.2 html5lib-1.1 idna-3.3 itsdangerous-2.0.1 packaging-21.3 passlib-1.7.4 pycparser-2.21 pyparsing-3.0.6 requests-2.27.1 sgmllib3k-1.0.0 six-1.16.0 temboz-4.5.5 urllib3-1.26.8 webencodings-0.5.1 werkzeug-2.0.2 yappi-1.3.3
$ chmod +x bin/temboz
$ ./bin/temboz
Traceback (most recent call last):
File "/home/user/.apps/temboz/./bin/temboz", line 4, in
import sanity
ModuleNotFoundError: No module named 'sanity'

@Silthanis
Copy link
Author

Thanks for the quick fix! The dbop import is running without errors now, but the Sanity import is still broken:

$ rm -r temboz
$ virtualenv temboz
created virtual environment CPython3.9.2.final.0-64 in 164ms
creator CPython3Posix(dest=/home/user/.apps/temboz, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/user/.local/share/virtualenv)
added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
 user  (e) temboz  ~  .apps  cd temboz
 user  (e) temboz  ~  .apps  temboz  pip install temboz
Collecting temboz
Downloading temboz-4.5.6.tar.gz (980 kB)
|████████████████████████████████| 980 kB 1.8 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting yappi
Using cached yappi-1.3.3-cp39-cp39-linux_x86_64.whl
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting werkzeug>=1.0.1
Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB)
Collecting flask
Using cached Flask-2.0.2-py3-none-any.whl (95 kB)
Collecting passlib
Using cached passlib-1.7.4-py2.py3-none-any.whl (525 kB)
Collecting bleach>=3.2.1
Using cached bleach-4.1.0-py2.py3-none-any.whl (157 kB)
Collecting argon2-cffi
Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting html5lib>=1.1
Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting feedparser>=6.0.2
Using cached feedparser-6.0.8-py3-none-any.whl (81 kB)
Collecting ctranslitcodec
Using cached ctranslitcodec-0.2.1-cp39-cp39-linux_x86_64.whl
Collecting sgmllib3k
Using cached sgmllib3k-1.0.0-py3-none-any.whl
Collecting six>=1.9.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting packaging
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting webencodings
Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting argon2-cffi-bindings
Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
Collecting cffi>=1.0.1
Using cached cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (444 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting Jinja2>=3.0
Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting itsdangerous>=2.0
Using cached itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting click>=7.1.2
Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.10-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Building wheels for collected packages: temboz
Building wheel for temboz (PEP 517) ... done
Created wheel for temboz: filename=temboz-4.5.6-py3-none-any.whl size=705710 sha256=0c3e90d1cf9f20e755e98134de20f792d7fa77ea5f0a462f802f7b39a80e029a
Stored in directory: /home/user/.cache/pip/wheels/c8/70/d3/79262bbd9ec7d19a422aec5d49b237ed5ad3d9d4549aef0814
Successfully built temboz
Installing collected packages: pycparser, pyparsing, MarkupSafe, cffi, werkzeug, webencodings, urllib3, six, sgmllib3k, packaging, Jinja2, itsdangerous, idna, click, charset-normalizer, certifi, argon2-cffi-bindings, yappi, requests, passlib, html5lib, flask, feedparser, ctranslitcodec, bleach, argon2-cffi, temboz
Successfully installed Jinja2-3.0.3 MarkupSafe-2.0.1 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 bleach-4.1.0 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.10 click-8.0.3 ctranslitcodec-0.2.1 feedparser-6.0.8 flask-2.0.2 html5lib-1.1 idna-3.3 itsdangerous-2.0.1 packaging-21.3 passlib-1.7.4 pycparser-2.21 pyparsing-3.0.6 requests-2.27.1 sgmllib3k-1.0.0 six-1.16.0 temboz-4.5.6 urllib3-1.26.8 webencodings-0.5.1 werkzeug-2.0.2 yappi-1.3.3
$ bin/temboz
Welcome to the Temboz initial setup wizard!

What IP address and TCP port should the server run on?
Choose 127.0.0.1 to only allow connections from this machine (default)
Choose 0.0.0.0 to allow connections from outside machines
Enter an IP address and port [127.0.0.1:9999]:
Choose a username: avery
Enter password:
Confirm password:
WARNING: rebuilding mv_feed_stats... done
Traceback (most recent call last):
File "/home/user/.apps/temboz/bin/temboz", line 29, in
import sanity
ModuleNotFoundError: No module named 'sanity'

@fazalmajid
Copy link
Owner

Yes, that is very strange as sanity.py is right next to temboz itself. Perhaps something strange in newer versions of virtualenv. I am trying to reproduce but in the meantime you can comment it out, it’s just an optional security check to verify the HTML sanitizer is working properly

@fazalmajid
Copy link
Owner

fazalmajid commented Jan 10, 2022

Could you just add something like:

import sys
print(“sys.path =“, sys.path)

just before the commented-out import sanity?

@fazalmajid fazalmajid reopened this Jan 10, 2022
@Silthanis
Copy link
Author

Definitely pip then. I see sanity.py in the git repo, but it doesn't appear in the virtualenv:

$ pwd
/home/user/.apps/temboz
$ find ./ -name sanity.py
$ cd temboz
$ vim bin/temboz
$ bin/temboz
sys.path = ['/home/user/.apps/temboz/bin', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/home/user/.apps/temboz/lib/python3.9/site-packages']

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

No branches or pull requests

2 participants