CiscoDevNet / yang-explorer

An open-source Yang Browser and RPC Builder Application
Apache License 2.0
437 stars 177 forks source link

can't login, error: server is not running #80

Open bos1234 opened 6 years ago

bos1234 commented 6 years ago

team, I able to get into the yang explorer gui but cannot login (please see screenshot below). image

OS: Ubuntu 16.04 fresh installation I followed the following steps in installing yang explorer: sudo pip install --upgrade setuptools sudo apt-get install python-virtualenv sudo apt-get install graphviz git clone https://github.com/CiscoDevNet/yang-explorer.git cd yang-explorer bash setup.sh cd /yang-explorer [sudo] ./start.sh &

Everytime I try to login, I get the following messages:

[26/Oct/2017 04:26:38] ERROR [django.request] Internal Server Error: /explorer/login Traceback (most recent call last): File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 108, in get_response response = middleware_method(request) File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/middleware/common.py", line 74, in process_request if (not urlresolvers.is_valid_path(request.path_info, urlconf) and File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 647, in is_valid_path resolve(path, urlconf) File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 522, in resolve return get_resolver(urlconf).resolve(path) File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in resolve for pattern in self.url_patterns: File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 402, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 396, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/suren/yang-explorer/server/server/urls.py", line 28, in ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static('/download/', document_root=os.path.join(settings.BASE_DIR,'data')) File "/home/suren/yang-explorer/v/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 33, in include urlconf_module = import_module(urlconf_module) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/suren/yang-explorer/server/explorer/urls.py", line 20, in from explorer import views, profile_view File "/home/suren/yang-explorer/server/explorer/views.py", line 30, in from explorer.utils.adapter import Adapter File "/home/suren/yang-explorer/server/explorer/utils/adapter.py", line 25, in from explorer.utils.netconf import gen_netconf File "/home/suren/yang-explorer/server/explorer/utils/netconf.py", line 23, in from explorer.utils.admin import ModuleAdmin File "/home/suren/yang-explorer/server/explorer/utils/admin.py", line 22, in from explorer.utils.yang import Compiler File "/home/suren/yang-explorer/server/explorer/utils/yang.py", line 24, in from explorer.utils.dygraph import DYGraph File "/home/suren/yang-explorer/server/explorer/utils/dygraph.py", line 19, in from graphviz import Digraph ImportError: No module named graphviz [26/Oct/2017 04:26:39]"POST /explorer/login HTTP/1.1" 500 186087

Please advise if any further information is required

chomezski commented 6 years ago

I am getting the same issue - any luck with troubleshooting it?

robertcsapo commented 6 years ago

Could you try running pip install -r requirements.txt ?

chomezski commented 6 years ago

This is the output:

Requirement already satisfied: Django==1.8.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) Requirement already satisfied: ecdsa==0.13 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) Requirement already satisfied: paramiko<=1.15.2,>=1.15.1 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) Requirement already satisfied: pycrypto==2.6.1 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 4)) Requirement already satisfied: requests==2.7.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5)) Requirement already satisfied: Jinja2==2.7.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6)) Requirement already satisfied: python-slugify in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 7)) Requirement already satisfied: django-debug-toolbar==1.4 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 8)) Requirement already satisfied: markupsafe in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 9)) Requirement already satisfied: lxml==3.4.4 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 10)) Requirement already satisfied: graphviz==0.4.9 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 11)) Requirement already satisfied: ncclient==0.5.2 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 12)) Requirement already satisfied: pyang==1.6.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 13)) Requirement already satisfied: Unidecode>=0.04.16 in /usr/local/lib/python2.7/dist-packages (from python-slugify->-r requirements.txt (line 7)) Requirement already satisfied: sqlparse in /usr/local/lib/python2.7/dist-packages (from django-debug-toolbar==1.4->-r requirements.txt (line 8)) Requirement already satisfied: six in /home/sapphireadmin/.local/lib/python2.7/site-packages (from ncclient==0.5.2->-r requirements.txt (line 12)) Requirement already satisfied: setuptools>0.6 in /usr/local/lib/python2.7/dist-packages (from ncclient==0.5.2->-r requirements.txt (line 12))

On Sat, Dec 16, 2017 at 10:48 AM, robertcsapo notifications@github.com wrote:

Could you try running pip install -r requirements.txt ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CiscoDevNet/yang-explorer/issues/80#issuecomment-352172940, or mute the thread https://github.com/notifications/unsubscribe-auth/Ag-M20l7kWm90p1uOUv9mFuA4Ecna0fzks5tA5HdgaJpZM4QG_pQ .

AJNOURI commented 6 years ago

Same issue here.

sudo pip install -r requirements.txt

results in:

Requirement already satisfied: Django==1.8.3 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 1))
Requirement already satisfied: ecdsa==0.13 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 2))
Requirement already satisfied: paramiko<=1.15.2,>=1.15.1 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 3))
Requirement already satisfied: pycrypto==2.6.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4))
Requirement already satisfied: requests==2.7.0 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 5))
Requirement already satisfied: Jinja2==2.7.3 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 6))
Requirement already satisfied: python-slugify in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 7))
Requirement already satisfied: django-debug-toolbar==1.4 in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 8))
Requirement already satisfied: markupsafe in /usr/local/lib/python3.4/dist-packages (from -r requirements.txt (line 9))
Collecting lxml==3.4.4 (from -r requirements.txt (line 10))
  Using cached https://files.pythonhosted.org/packages/63/c7/4f2a2a4ad6c6fa99b14be6b3c1cece9142e2d915aa7c43c908677afc8fa4/lxml-3.4.4.tar.gz
Collecting graphviz==0.4.9 (from -r requirements.txt (line 11))
  Using cached https://files.pythonhosted.org/packages/c4/49/8cca291fd18b19470bfd0028ea18da8d9ad01ddd4ce6f8d170f9475e3db5/graphviz-0.4.9-py2.py3-none-any.whl
Collecting ncclient==0.5.2 (from -r requirements.txt (line 12))
Collecting pyang==1.6.0 (from -r requirements.txt (line 13))
  Using cached https://files.pythonhosted.org/packages/14/7f/6453533b35b2e832daab4bcfda0d01c7f44b29030d46ad0e68f9c14bdbec/pyang-1.6-py2.py3-none-any.whl
Requirement already satisfied: Unidecode>=0.04.16 in /usr/local/lib/python3.4/dist-packages (from python-slugify->-r requirements.txt (line 7))
Requirement already satisfied: sqlparse in /usr/local/lib/python3.4/dist-packages (from django-debug-toolbar==1.4->-r requirements.txt (line 8))
Requirement already satisfied: six in /usr/local/lib/python3.4/dist-packages (from ncclient==0.5.2->-r requirements.txt (line 12))
Requirement already satisfied: setuptools>0.6 in /usr/local/lib/python3.4/dist-packages (from ncclient==0.5.2->-r requirements.txt (line 12))
Building wheels for collected packages: lxml
  Running setup.py bdist_wheel for lxml: started
  Running setup.py bdist_wheel for lxml: finished with status 'error'
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-u3bnf1x4/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmphedb839npip-wheel- --python-tag cp34:
  Building lxml version 3.4.4.
  Building without Cython.
  ERROR: b'/bin/sh: 1: xslt-config: not found\n'
  ** make sure the development packages of libxml2 and libxslt are installed **

  Using build configuration of libxslt
  /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.4
  creating build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/sax.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/builder.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.4/lxml
  creating build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.4/lxml/includes
  creating build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.4/lxml/html
  copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.4/lxml/html
  creating build/lib.linux-x86_64-3.4/lxml/isoschematron
  copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.4/lxml/isoschematron
  copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.4/lxml
  copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes
  copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.4/lxml/includes
  creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources
  creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
  creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
  creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  running build_ext
  building 'lxml.etree' extension
  creating build/temp.linux-x86_64-3.4
  creating build/temp.linux-x86_64-3.4/src
  creating build/temp.linux-x86_64-3.4/src/lxml
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-u3bnf1x4/lxml/src/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
  In file included from src/lxml/lxml.etree.c:239:0:
  /tmp/pip-build-u3bnf1x4/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
   #include "libxml/xmlversion.h"
                                 ^
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, graphviz, ncclient, pyang
  Found existing installation: lxml 3.4.0
    Uninstalling lxml-3.4.0:
      Successfully uninstalled lxml-3.4.0
  Running setup.py install for lxml: started
    Running setup.py install for lxml: finished with status 'error'
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-u3bnf1x4/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2r8ydfdb-record/install-record.txt --single-version-externally-managed --compile:
    Building lxml version 3.4.4.
    Building without Cython.
    ERROR: b'/bin/sh: 1: xslt-config: not found\n'
    ** make sure the development packages of libxml2 and libxslt are installed **

    Using build configuration of libxslt
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.4
    creating build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/sax.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/builder.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.4/lxml
    creating build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.4/lxml/includes
    creating build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.4/lxml/html
    copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.4/lxml/html
    creating build/lib.linux-x86_64-3.4/lxml/isoschematron
    copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.4/lxml/isoschematron
    copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.4/lxml
    copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes
    copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.4/lxml/includes
    creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources
    creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng
    creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl
    creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-3.4
    creating build/temp.linux-x86_64-3.4/src
    creating build/temp.linux-x86_64-3.4/src/lxml
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-u3bnf1x4/lxml/src/lxml/includes -I/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w
    In file included from src/lxml/lxml.etree.c:239:0:
    /tmp/pip-build-u3bnf1x4/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
  Rolling back uninstall of lxml

lxml looks installed:

sudo sudo pip install lxml
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages

Doesn't seem to be lot of activity here. Is the project still active?

AJNOURI commented 6 years ago

Corrected the previous errors using:

apt-get install libxml2-dev libxslt1-dev python-dev
apt-get install python-lxml

But still cannot login:

ImportError: No module named graphviz

[13/Jun/2018 19:56:37]"GET / HTTP/1.1" 500 166340
[13/Jun/2018 19:57:07] ERROR [django.request] Internal Server Error: /explorer/login
Traceback (most recent call last):
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 108, in get_response
    response = middleware_method(request)
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/middleware/common.py", line 74, in process_request
    if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 647, in is_valid_path
    resolve(path, urlconf)
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 522, in resolve
    return get_resolver(urlconf).resolve(path)
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in resolve
    for pattern in self.url_patterns:
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 402, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 396, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/ajn/github/yang-explorer/yang-explorer/server/server/urls.py", line 28, in <module>
    ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static('/download/', document_root=os.path.join(settings.BASE_DIR,'data'))
  File "/home/ajn/github/yang-explorer/yang-explorer/v/local/lib/python2.7/site-packages/django/conf/urls/__init__.py", line 33, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/urls.py", line 20, in <module>
    from explorer import views, profile_view
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/views.py", line 30, in <module>
    from explorer.utils.adapter import Adapter
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/utils/adapter.py", line 25, in <module>
    from explorer.utils.netconf import gen_netconf
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/utils/netconf.py", line 23, in <module>
    from explorer.utils.admin import ModuleAdmin
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/utils/admin.py", line 22, in <module>
    from explorer.utils.yang import Compiler
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/utils/yang.py", line 24, in <module>
    from explorer.utils.dygraph import DYGraph
  File "/home/ajn/github/yang-explorer/yang-explorer/server/explorer/utils/dygraph.py", line 19, in <module>
    from graphviz import Digraph
ImportError: No module named graphviz
[13/Jun/2018 19:57:08]"POST /explorer/login HTTP/1.1" 500 184711

Eventhough graphiz is installed:

sudo apt-get install graphviz
Reading package lists... Done
Building dependency tree       
Reading state information... Done
graphviz is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jszucs commented 6 years ago

Having exact issues as above on Ubuntu 16.04 -- any suggestions?

alexcherry83 commented 6 years ago

Same issue here, tried everything already, Ubuntu 16.04.4 LTS

ssaptarshi commented 6 years ago

Got a workaround for this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setup.sh. So even if one has the graphviz module installed on the system, it's not available to Yang explorer.

Here are the steps, assuming you have got the Yang explorer code in a zip archive -

  1. We need to start fresh - remove existing yang_explorer folder
  2. Recreate the yang explorer folder by unzipping the archive
  3. Run the setup script
  4. Manually activate the python virtualenv in folder v
  5. Install graphviz in the virtualenv using pip install graphviz
  6. Deactivate the virtualenv (for steps 4, 5 and 6 you may refer to https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2 steps 6,7 and onward are applicable)
  7. Run the start.sh script - now the server should work as expected.

The setup.sh script needs a fix to ensure graphviz is not missed in the virtualenv setup.

chomezski commented 6 years ago

Actually I was going to say that I havent troubleshooted further - I ended up re-building the server and it worked. Assuming the above happened :) Thanks

On Thu, Aug 23, 2018 at 12:55 AM Santosh Saptarshi notifications@github.com wrote:

Got a workaround for this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setup.sh. So even if one has the graphviz module installed on the system, it's not available to Yang explorer.

Here are the steps, assuming you have got the Yang explorer code in a zip archive -

  1. We need to start fresh - remove existing yang_explorer folder
  2. Recreate the yang explorer folder by unzipping the archive
  3. Run the setup script
  4. Manually activate the python virtualenv in folder v
  5. Install graphviz in the virtualenv using pip install graphviz
  6. Deactivate the virtualenv (for steps 4, 5 and 6 you may refer to https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2 steps 6,7 and onward are applicable)
  7. Run the start.sh script - now the server should work as expected.

The setup.sh script needs a fix to ensure graphviz is not missed in the virtualenv setup.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CiscoDevNet/yang-explorer/issues/80#issuecomment-415290650, or mute the thread https://github.com/notifications/unsubscribe-auth/Ag-M23CGNt_sC4RhGBmx-LARxug4pFTiks5uTjXVgaJpZM4QG_pQ .

j0876car commented 5 years ago

Got a workaround for this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setup.sh. So even if one has the graphviz module installed on the system, it's not available to Yang explorer.

Here are the steps, assuming you have got the Yang explorer code in a zip archive -

1. We need to start fresh - remove existing yang_explorer folder

2. Recreate the yang explorer folder by unzipping the archive

3. Run the setup script

4. Manually activate the python virtualenv in folder v

5. Install graphviz in the virtualenv using pip install graphviz

6. Deactivate the virtualenv
   (for steps 4, 5 and 6 you may refer to https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2  steps 6,7 and onward are applicable)

7. Run the start.sh script - now the server should work as expected.

The setup.sh script needs a fix to ensure graphviz is not missed in the virtualenv setup. thank you ssaptarshi this worked just as you explained!

andrearaujo1988 commented 4 years ago

Got a workaround for this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setup.sh. So even if one has the graphviz module installed on the system, it's not available to Yang explorer.

Here are the steps, assuming you have got the Yang explorer code in a zip archive -

  1. We need to start fresh - remove existing yang_explorer folder
  2. Recreate the yang explorer folder by unzipping the archive
  3. Run the setup script
  4. Manually activate the python virtualenv in folder v
  5. Install graphviz in the virtualenv using pip install graphviz
  6. Deactivate the virtualenv (for steps 4, 5 and 6 you may refer to https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2 steps 6,7 and onward are applicable)
  7. Run the start.sh script - now the server should work as expected.

The setup.sh script needs a fix to ensure graphviz is not missed in the virtualenv setup.

Thank you very much sir.

mazharhub commented 3 years ago

this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setu

Worked for me, Thanks for sharing

toxkalcan commented 2 years ago

Got a workaround for this. The Yang Explorer uses Python Virtual environment (poor man's Docker!) - through virtualenv module. This is created in the folder "v" inside the yang_explorer folder.

Somehow, graphviz is not installed on this virtualenv, when we run setup.sh. So even if one has the graphviz module installed on the system, it's not available to Yang explorer.

Here are the steps, assuming you have got the Yang explorer code in a zip archive -

  1. We need to start fresh - remove existing yang_explorer folder
  2. Recreate the yang explorer folder by unzipping the archive
  3. Run the setup script
  4. Manually activate the python virtualenv in folder v
  5. Install graphviz in the virtualenv using pip install graphviz
  6. Deactivate the virtualenv (for steps 4, 5 and 6 you may refer to https://help.dreamhost.com/hc/en-us/articles/215489338-Installing-and-using-virtualenv-with-Python-2 steps 6,7 and onward are applicable)
  7. Run the start.sh script - now the server should work as expected.

The setup.sh script needs a fix to ensure graphviz is not missed in the virtualenv setup.

Hi I am getting graphviz not installed error as well, and I tried to implement this workaround however when I ran setup.py , Iam getting manage.py not found error ,therefore, database does not start . I can see manage.py is there but setup.py does not get it. Did anyone ever have the same problem ?

_yang-explorer-master$ find . | grep manage.py ./v/lib/python2.7/site-packages/django/conf/project_template/manage.pyc ./v/lib/python2.7/site-packages/django/conf/projecttemplate/manage.py ./server/manage.py

Successfully installed ydk-models-cisco-ios-xr-6.2.1 setup.sh: line 102: cd: ../../yang-explorer: No such file or directory Installing dependencies .. done Setting up initial database .. setup.sh: line 133: cd: server: No such file or directory Creating data directories .. Creating database .. python: can't open file 'manage.py': [Errno 2] No such file or directory Creating default users .. python: can't open file 'manage.py': [Errno 2] No such file or directory Setup completed..

Use start.sh to start yang-explorer server