ABHIONLINUX
Site useful for linux administration and web hosting

2013/03/09

NginxCP – SyntaxError: ‘yield’ not allowed in a ‘try’ block with a ‘finally’ clause

When you install cpnginx cpanel plugin, you can get the following error.

====================================
root@localhost [/usr/local/src/publicnginx]# ./nginxinstaller install
/usr/local/src/publicnginx
Welcome to the Nginx Admin installer......Starting Install
Generating vhosts...
Traceback (most recent call last):
File "/scripts/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
Installing WHM interface...
deploying booster rockets
Traceback (most recent call last):
File "/usr/local/src/publicnginx/nginxinstaller2", line 9, in ?
import createvhosts
File "/usr/local/src/publicnginx/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
root@localhost [/usr/local/src/publicnginx]#
====================================

You can fix it by running pythonfix

/usr/local/src/publicnginx]# ./pythonfix


No comments:

Post a Comment