marvin-zhao / pyang

Automatically exported from code.google.com/p/pyang
0 stars 0 forks source link

Pyang 1.5 Compile / runtime syntax error #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download pyang 1.5 tarball
2. Install as per README instructions. See the following error:

What is the expected output? What do you see instead?

$ sudo python setup.py install
[sudo] password for pcrooks: 
running install
running build
running build_py
running build_scripts
running install_lib
byte-compiling /usr/local/lib/python2.6/dist-packages/pyang/plugins/jtox.py to 
jtox.pyc
SyntaxError: ('invalid syntax', 
('/usr/local/lib/python2.6/dist-packages/pyang/plugins/jtox.py', 49, 20, '      
           for m,p in unique_prefixes(ctx).items() }\n'))

byte-compiling 
/usr/local/lib/python2.6/dist-packages/pyang/plugins/sample-xml-skeleton.py to 
sample-xml-skeleton.pyc
SyntaxError: ('invalid syntax', 
('/usr/local/lib/python2.6/dist-packages/pyang/plugins/sample-xml-skeleton.py', 
103, 65, '        self.ns_uri = { yam : yam.search_one("namespace").arg for yam 
in modules }\n'))

running install_scripts
changing mode of /usr/local/bin/yang2html to 755
changing mode of /usr/local/bin/json2xml to 755
changing mode of /usr/local/bin/pyang to 755
changing mode of /usr/local/bin/yang2dsdl to 755
running install_data
running install_egg_info
Removing /usr/local/lib/python2.6/dist-packages/pyang-1.5.egg-info
Writing /usr/local/lib/python2.6/dist-packages/pyang-1.5.egg-info

What version of the product are you using? On what operating system?
Pyang 1.5, Python 2.6.6, Debian 4.3.5-4 (2.6.32-48squeeze6)

Please provide any additional information below.

After compilation, I get the following error when I try and run pyang:

$ pyang -h
Traceback (most recent call last):
  File "/usr/local/bin/pyang", line 403, in <module>
    run()
  File "/usr/local/bin/pyang", line 27, in run
    plugin.init(plugindirs)
  File "/usr/local/lib/python2.6/dist-packages/pyang/plugin.py", line 35, in init
    pluginmod = __import__(fname[:-3])
  File "/usr/local/lib/python2.6/dist-packages/pyang/plugins/jtox.py", line 49
    for m,p in unique_prefixes(ctx).items() }
      ^
SyntaxError: invalid syntax

Original issue reported on code.google.com by pgcro...@gmail.com on 17 Feb 2015 at 9:14

GoogleCodeExporter commented 9 years ago
Lada, I assume this is a duplicate of #116?

Original comment by mbj4...@gmail.com on 17 Feb 2015 at 11:15

GoogleCodeExporter commented 9 years ago
Ah sorry, I had search around for another bug like this but obviously I missed 
that one. 

Original comment by pgcro...@gmail.com on 17 Feb 2015 at 11:21

GoogleCodeExporter commented 9 years ago

Original comment by lada.lho...@gmail.com on 26 Feb 2015 at 10:09