GithubHelp home page GithubHelp logo

Comments (7)

robshakir avatar robshakir commented on May 18, 2024

Hi,

Can you provide the output of:

/usr/bin/env python -c 'import pyangbind; import os; print "%s/plugin" % os.path.dirname(pyangbind.__file__)'

You should use whatever path is supply there (ideally the absolute path, rather than the relative one) after --plugindir.

This error (unsupported format) means that pyang is not finding the plugindir with pybind.py in it.

Cheers,
r.

from pyangbind.

ashishk1994 avatar ashishk1994 commented on May 18, 2024

Hi,
For below command,

/usr/bin/env python -c 'import pyangbind; import os; print "%s/plugin" % os.path.dirname(pyangbind.__file__)'

output is : /usr/local/lib/python2.7/dist-packages/pyangbind-0.2.1-py2.7.egg/pyangbind/plugin

I tried with above path as follows:

pyang --plugindir /usr/local/lib/python2.7/dist-packages/pyangbind-0.2.1-py2.7.egg/pyangbind/plugin -f pybind turing-machine.yang -o bindings.py

It is still giving me the same error.

unsupported format 'pybind' error.

from pyangbind.

robshakir avatar robshakir commented on May 18, 2024

Does your user have permission to read the /usr/local/lib/python2.7/dist-packages/pyangbind-0.2.1-py2.7.egg/pyangbind/plugin/pybind.py file? What version of pyang are you running, and on what distro (I assume Linux)?

from pyangbind.

ashishk1994 avatar ashishk1994 commented on May 18, 2024

I tried it with the sudo but still the same error.
I am using pyang 1.6. pyang --version

pyang 1.6

and ubuntu 12.04
My plugin directory is :

/usr/local/lib/python2.7/dist-packages/pyangbind-0.2.1-py2.7.egg/pyangbind/plugin

Why did you put pybind.py at the last?

from pyangbind.

robshakir avatar robshakir commented on May 18, 2024

pybind.py is the file that defines the format of pybind that your pyang is reporting it can't find.

How did you install pyangbind? I note that you have an egg specified in that path, but I only upload a wheel and sdist to PyPI. When I install it through pip on any Linux I have access to, it's never within an egg.

from pyangbind.

ashishk1994 avatar ashishk1994 commented on May 18, 2024

Actually I was using pip version 1.2 . I upgraded the pip on my system then installed pyangbind again. It worked.
Thanks

from pyangbind.

robshakir avatar robshakir commented on May 18, 2024

Great - closing.

from pyangbind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.