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

unsupported format 'pybind' #30

Closed
ashishk1994 opened this issue Jan 22, 2016 · 7 comments
Closed

unsupported format 'pybind' #30

ashishk1994 opened this issue Jan 22, 2016 · 7 comments

Comments

@ashishk1994
Copy link

I am trying to bind using following command but getting unsupported format 'pybind' error.

sudo pyang --plugindir site-packages/pyangbind/plugin -f pybind turing-machine.yang -o bindings.py

Can someone please help me with this.

@robshakir
Copy link
Owner

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.

@ashishk1994
Copy link
Author

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.

@robshakir
Copy link
Owner

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)?

@ashishk1994
Copy link
Author

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?

@robshakir
Copy link
Owner

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.

@ashishk1994
Copy link
Author

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

@robshakir
Copy link
Owner

Great - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants