frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.4k stars 1.21k forks source link

Sanitizer module not found during Bench initialization #367

Closed motorcityadam closed 7 years ago

motorcityadam commented 7 years ago

Steps to reproduce issue:

  1. Provision a fresh install or fresh VM with CentOS 7.
  2. Install all prerequisites via yum.
  3. Install Bench (no errors).
  4. Attempt to initialize a bench via bench init frappe-bench --verbose.

Expected behavior:

Bench should initialize successfully without errors.

Observed behavior:

A Python error occurs claiming that 'sanitizer' module cannot be found. See full verbose output from bench init below:

[adamj@erpnext1-erpnext1 ~]$ bench init frappe-bench --verbose
Already using interpreter /usr/bin/python2
INFO:bench.app:getting app frappe
Cloning into 'frappe'...
remote: Counting objects: 121406, done.
remote: Total 121406 (delta 0), reused 0 (delta 0), pack-reused 121406
Receiving objects: 100% (121406/121406), 92.50 MiB | 31.52 MiB/s, done.
Resolving deltas: 100% (90802/90802), done.
installing frappe
INFO:bench.app:installing frappe
Obtaining file:///home/adamj/frappe-bench/apps/frappe
Collecting chardet (from frappe==7.2.28)
  Using cached chardet-2.3.0-py2.py3-none-any.whl
Collecting cssmin (from frappe==7.2.28)
Collecting dropbox (from frappe==7.2.28)
  Using cached dropbox-7.2.1-py2-none-any.whl
Collecting gunicorn (from frappe==7.2.28)
  Using cached gunicorn-19.7.0-py2.py3-none-any.whl
Collecting httplib2 (from frappe==7.2.28)
Collecting jinja2 (from frappe==7.2.28)
  Using cached Jinja2-2.9.5-py2.py3-none-any.whl
Collecting markdown2 (from frappe==7.2.28)
Collecting markupsafe (from frappe==7.2.28)
Collecting mysql-python==1.2.5 (from frappe==7.2.28)
Collecting python-geoip (from frappe==7.2.28)
  Using cached python_geoip-1.2-py27-none-any.whl
Collecting python-geoip-geolite2 (from frappe==7.2.28)
  Using cached python_geoip_geolite2-2015.0303-py2-none-any.whl
Collecting python-dateutil (from frappe==7.2.28)
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting pytz (from frappe==7.2.28)
  Using cached pytz-2016.10-py2.py3-none-any.whl
Requirement already satisfied: six in ./frappe-bench/env/lib/python2.7/site-packages (from frappe==7.2.28)
Collecting termcolor (from frappe==7.2.28)
Collecting werkzeug (from frappe==7.2.28)
  Using cached Werkzeug-0.11.15-py2.py3-none-any.whl
Collecting semantic_version (from frappe==7.2.28)
Collecting rauth>=0.6.2 (from frappe==7.2.28)
  Using cached rauth-0.7.3-py2-none-any.whl
Collecting requests (from frappe==7.2.28)
  Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting redis (from frappe==7.2.28)
  Using cached redis-2.10.5-py2.py3-none-any.whl
Collecting selenium (from frappe==7.2.28)
  Using cached selenium-3.3.0-py2.py3-none-any.whl
Requirement already satisfied: pdfkit in ./frappe-bench/env/src/pdfkit (from frappe==7.2.28)
Collecting babel (from frappe==7.2.28)
  Using cached Babel-2.3.4-py2.py3-none-any.whl
Collecting ipython (from frappe==7.2.28)
  Using cached ipython-5.3.0-py2-none-any.whl
Collecting html2text (from frappe==7.2.28)
Collecting email_reply_parser (from frappe==7.2.28)
Collecting click (from frappe==7.2.28)
  Using cached click-6.7-py2.py3-none-any.whl
Collecting num2words (from frappe==7.2.28)
Collecting watchdog==0.8.0 (from frappe==7.2.28)
Collecting bleach (from frappe==7.2.28)
  Using cached bleach-2.0.0-py2.py3-none-any.whl
Collecting bleach-whitelist (from frappe==7.2.28)
Collecting Pillow (from frappe==7.2.28)
  Using cached Pillow-4.0.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting beautifulsoup4 (from frappe==7.2.28)
  Using cached beautifulsoup4-4.5.3-py2-none-any.whl
Collecting rq (from frappe==7.2.28)
  Using cached rq-0.7.1-py2.py3-none-any.whl
Collecting schedule (from frappe==7.2.28)
  Using cached schedule-0.4.2-py2.py3-none-any.whl
Collecting cryptography (from frappe==7.2.28)
  Using cached cryptography-1.7.2.tar.gz
Collecting zxcvbn (from frappe==7.2.28)
Collecting psutil (from frappe==7.2.28)
Collecting unittest-xml-reporting (from frappe==7.2.28)
  Using cached unittest_xml_reporting-2.1.0-py2.py3-none-any.whl
Collecting xlwt (from frappe==7.2.28)
  Using cached xlwt-1.2.0-py2.py3-none-any.whl
Collecting oauthlib (from frappe==7.2.28)
Collecting PyJWT (from frappe==7.2.28)
  Using cached PyJWT-1.4.2-py2.py3-none-any.whl
Collecting pypdf (from frappe==7.2.28)
Collecting openpyxl (from frappe==7.2.28)
Collecting typing>=3.5.2 (from dropbox->frappe==7.2.28)
Collecting urllib3 (from dropbox->frappe==7.2.28)
  Using cached urllib3-1.20-py2.py3-none-any.whl
Collecting pygments (from ipython->frappe==7.2.28)
  Using cached Pygments-2.2.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in ./frappe-bench/env/lib/python2.7/site-packages (from ipython->frappe==7.2.28)
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython->frappe==7.2.28)
  Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Collecting traitlets>=4.2 (from ipython->frappe==7.2.28)
  Using cached traitlets-4.3.2-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython->frappe==7.2.28)
Collecting pickleshare (from ipython->frappe==7.2.28)
  Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting decorator (from ipython->frappe==7.2.28)
  Using cached decorator-4.0.11-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython->frappe==7.2.28)
  Using cached prompt_toolkit-1.0.13-py2-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython->frappe==7.2.28)
  Using cached pexpect-4.2.1-py2.py3-none-any.whl
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython->frappe==7.2.28)
  Using cached pathlib2-2.2.1-py2.py3-none-any.whl
Collecting PyYAML>=3.10 (from watchdog==0.8.0->frappe==7.2.28)
Collecting argh>=0.24.1 (from watchdog==0.8.0->frappe==7.2.28)
  Using cached argh-0.26.2-py2.py3-none-any.whl
Collecting pathtools>=0.1.1 (from watchdog==0.8.0->frappe==7.2.28)
Collecting html5lib>=0.99999999 (from bleach->frappe==7.2.28)
  Using cached html5lib-0.999999999-py2.py3-none-any.whl
Collecting olefile (from Pillow->frappe==7.2.28)
Collecting idna>=2.0 (from cryptography->frappe==7.2.28)
  Using cached idna-2.5-py2.py3-none-any.whl
Collecting pyasn1>=0.1.8 (from cryptography->frappe==7.2.28)
  Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Collecting enum34 (from cryptography->frappe==7.2.28)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting ipaddress (from cryptography->frappe==7.2.28)
  Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting cffi>=1.4.1 (from cryptography->frappe==7.2.28)
  Using cached cffi-1.9.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting jdcal (from openpyxl->frappe==7.2.28)
Collecting et-xmlfile (from openpyxl->frappe==7.2.28)
Requirement already satisfied: appdirs>=1.4.0 in ./frappe-bench/env/lib/python2.7/site-packages (from setuptools>=18.5->ipython->frappe==7.2.28)
Requirement already satisfied: packaging>=16.8 in ./frappe-bench/env/lib/python2.7/site-packages (from setuptools>=18.5->ipython->frappe==7.2.28)
Collecting ipython-genutils (from traitlets>=4.2->ipython->frappe==7.2.28)
  Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython->frappe==7.2.28)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython->frappe==7.2.28)
  Using cached ptyprocess-0.5.1-py2.py3-none-any.whl
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython->frappe==7.2.28)
Collecting webencodings (from html5lib>=0.99999999->bleach->frappe==7.2.28)
Collecting pycparser (from cffi>=1.4.1->cryptography->frappe==7.2.28)
Requirement already satisfied: pyparsing in ./frappe-bench/env/lib/python2.7/site-packages (from packaging>=16.8->setuptools>=18.5->ipython->frappe==7.2.28)
Building wheels for collected packages: cryptography
  Running setup.py bdist_wheel for cryptography ... done
  Stored in directory: /home/adamj/.cache/pip/wheels/3e/09/be/ca344cd1e68fd4d4d8872a25287e884a6f73557710efa51019
Successfully built cryptography
Installing collected packages: chardet, cssmin, typing, requests, urllib3, dropbox, gunicorn, httplib2, markupsafe, jinja2, markdown2, mysql-python, python-geoip, python-geoip-geolite2, python-dateutil, pytz, termcolor, werkzeug, semantic-version, rauth, redis, selenium, babel, pygments, backports.shutil-get-terminal-size, ipython-genutils, decorator, enum34, traitlets, simplegeneric, scandir, pathlib2, pickleshare, wcwidth, prompt-toolkit, ptyprocess, pexpect, ipython, html2text, email-reply-parser, click, num2words, PyYAML, argh, pathtools, watchdog, webencodings, html5lib, bleach, bleach-whitelist, olefile, Pillow, beautifulsoup4, rq, schedule, idna, pyasn1, ipaddress, pycparser, cffi, cryptography, zxcvbn, psutil, unittest-xml-reporting, xlwt, oauthlib, PyJWT, pypdf, jdcal, et-xmlfile, openpyxl, frappe
  Running setup.py develop for frappe
Successfully installed Pillow-4.0.0 PyJWT-1.4.2 PyYAML-3.12 argh-0.26.2 babel-2.3.4 backports.shutil-get-terminal-size-1.0.0 beautifulsoup4-4.5.3 bleach-2.0.0 bleach-whitelist-0.0.7 cffi-1.9.1 chardet-2.3.0 click-6.7 cryptography-1.7.2 cssmin-0.2.0 decorator-4.0.11 dropbox-7.2.1 email-reply-parser-0.5.9 enum34-1.1.6 et-xmlfile-1.0.1 frappe gunicorn-19.7.0 html2text-2016.9.19 html5lib-0.999999999 httplib2-0.10.3 idna-2.5 ipaddress-1.0.18 ipython-5.3.0 ipython-genutils-0.1.0 jdcal-1.3 jinja2-2.9.5 markdown2-2.3.3 markupsafe-1.0 mysql-python-1.2.5 num2words-0.5.4 oauthlib-2.0.1 olefile-0.44 openpyxl-2.4.5 pathlib2-2.2.1 pathtools-0.1.2 pexpect-4.2.1 pickleshare-0.7.4 prompt-toolkit-1.0.13 psutil-5.2.0 ptyprocess-0.5.1 pyasn1-0.2.3 pycparser-2.17 pygments-2.2.0 pypdf-1.13 python-dateutil-2.6.0 python-geoip-1.2 python-geoip-geolite2-2015.303 pytz-2016.10 rauth-0.7.3 redis-2.10.5 requests-2.13.0 rq-0.7.1 scandir-1.5 schedule-0.4.2 selenium-3.3.0 semantic-version-2.6.0 simplegeneric-0.8.1 termcolor-1.1.0 traitlets-4.3.2 typing-3.5.3.0 unittest-xml-reporting-2.1.0 urllib3-1.20 watchdog-0.8.0 wcwidth-0.1.7 webencodings-0.5 werkzeug-0.11.15 xlwt-1.2.0 zxcvbn-1.0
/home/adamj/frappe-bench
├─┬ express@4.15.2
│ ├─┬ accepts@1.3.3
│ │ ├─┬ mime-types@2.1.14
│ │ │ └── mime-db@1.26.0
│ │ └── negotiator@0.6.1
│ ├── array-flatten@1.1.1
│ ├── content-disposition@0.5.2
│ ├── content-type@1.0.2
│ ├── cookie@0.3.1
│ ├── cookie-signature@1.0.6
│ ├── debug@2.6.1
│ ├── depd@1.1.0
│ ├── encodeurl@1.0.1
│ ├── escape-html@1.0.3
│ ├── etag@1.8.0
│ ├─┬ finalhandler@1.0.0
│ │ └── unpipe@1.0.0
│ ├── fresh@0.5.0
│ ├── merge-descriptors@1.0.1
│ ├── methods@1.1.2
│ ├─┬ on-finished@2.3.0
│ │ └── ee-first@1.1.1
│ ├── parseurl@1.3.1
│ ├── path-to-regexp@0.1.7
│ ├─┬ proxy-addr@1.1.3
│ │ ├── forwarded@0.1.0
│ │ └── ipaddr.js@1.2.0
│ ├── qs@6.4.0
│ ├── range-parser@1.2.0
│ ├─┬ send@0.15.1
│ │ ├── destroy@1.0.4
│ │ └── http-errors@1.6.1
│ ├── serve-static@1.12.1
│ ├── setprototypeof@1.0.3
│ ├── statuses@1.3.1
│ ├─┬ type-is@1.6.14
│ │ └── media-typer@0.3.0
│ ├── utils-merge@1.0.0
│ └── vary@1.1.0
├─┬ redis@2.6.5
│ ├── double-ended-queue@2.1.0-0
│ ├── redis-commands@1.3.1
│ └── redis-parser@2.4.0
├─┬ socket.io@1.7.3
│ ├─┬ debug@2.3.3
│ │ └── ms@0.7.2
│ ├─┬ engine.io@1.8.3
│ │ ├── base64id@1.0.0
│ │ ├── debug@2.3.3
│ │ ├─┬ engine.io-parser@1.3.2
│ │ │ ├── after@0.8.2
│ │ │ ├── arraybuffer.slice@0.0.6
│ │ │ ├── base64-arraybuffer@0.1.5
│ │ │ ├── blob@0.0.4
│ │ │ └── wtf-8@1.0.0
│ │ └─┬ ws@1.1.2
│ │   ├── options@0.0.6
│ │   └── ultron@1.0.2
│ ├─┬ has-binary@0.1.7
│ │ └── isarray@0.0.1
│ ├── object-assign@4.1.0
│ ├─┬ socket.io-adapter@0.5.0
│ │ └── debug@2.3.3
│ ├─┬ socket.io-client@1.7.3
│ │ ├── backo2@1.0.2
│ │ ├── component-bind@1.0.0
│ │ ├── component-emitter@1.2.1
│ │ ├── debug@2.3.3
│ │ ├─┬ engine.io-client@1.8.3
│ │ │ ├── component-emitter@1.2.1
│ │ │ ├── component-inherit@0.0.3
│ │ │ ├── debug@2.3.3
│ │ │ ├── has-cors@1.1.0
│ │ │ ├── parsejson@0.0.3
│ │ │ ├── parseqs@0.0.5
│ │ │ ├── xmlhttprequest-ssl@1.5.3
│ │ │ └── yeast@0.1.2
│ │ ├── indexof@0.0.1
│ │ ├── object-component@0.0.3
│ │ ├─┬ parseuri@0.0.5
│ │ │ └─┬ better-assert@1.0.2
│ │ │   └── callsite@1.0.0
│ │ └── to-array@0.1.4
│ └─┬ socket.io-parser@2.3.1
│   ├── component-emitter@1.1.2
│   ├─┬ debug@2.2.0
│   │ └── ms@0.7.1
│   └── json3@3.3.2
└─┬ superagent@3.5.0
  ├── component-emitter@1.2.1
  ├── cookiejar@2.1.0
  ├── extend@3.0.0
  ├─┬ form-data@2.1.2
  │ ├── asynckit@0.4.0
  │ └─┬ combined-stream@1.0.5
  │   └── delayed-stream@1.0.0
  ├── formidable@1.1.1
  ├── mime@1.3.4
  └─┬ readable-stream@2.2.3
    ├── buffer-shims@1.0.0
    ├── core-util-is@1.0.2
    ├── inherits@2.0.3
    ├── isarray@1.0.0
    ├── process-nextick-args@1.0.7
    ├── string_decoder@0.10.31
    └── util-deprecate@1.0.2

npm WARN enoent ENOENT: no such file or directory, open '/home/adamj/frappe-bench/package.json'
npm WARN frappe-bench No description
npm WARN frappe-bench No repository field.
npm WARN frappe-bench No README data
npm WARN frappe-bench No license field.
/home/adamj/frappe-bench/env/bin/python: No module named sanitizer

Notes:

  1. This observed behavior is similar to this issue that seems yet unresolved in the "bleach" project which I believe "frappe" uses. I will investigate further to confirm.
  2. Also possibly related: https://github.com/html5lib/html5lib-python/issues/277
rmehta commented 7 years ago

Fixed!