Closed mlaradji closed 5 years ago
OS: Ubuntu 18.04.1 running in an LXD container LXD: 3.6 (snap) conda: 4.5.11 Python: 3.7.0.final.0 advisor: 0.1.6
I have installed advisor through pip on a fresh Python 3.7 miniconda installation. Running advisor_admin server start results in the following error:
advisor
pip
advisor_admin server start
Traceback (most recent call last): File "/home/ubuntu/.conda/envs/ubuntu/bin/advisor_admin", line 7, in <module> from advisor_client.commandline.admin_command import main File "/home/ubuntu/.conda/envs/ubuntu/lib/python3.7/site-packages/advisor_client/commandline/admin_command.py", line 110 except subprocess.CalledProcessError, e: ^ SyntaxError: invalid syntax
The error can be resolved by simply changing the following line in admin_command.py:
admin_command.py
except subprocess.CalledProcessError, e:
to
except subprocess.CalledProcessError as e:
After that change, advisor_admin server start runs on my system without errors.
Note that as is not supported in Python versions below 2.5 (according to an answer in https://stackoverflow.com/questions/2535760/python-try-except-comma-vs-as-in-except).
as
Note that I have created a pull request for the proposed change.
Resolved by https://github.com/tobegit3hub/advisor/pull/21 .
System Information
OS: Ubuntu 18.04.1 running in an LXD container LXD: 3.6 (snap) conda: 4.5.11 Python: 3.7.0.final.0 advisor: 0.1.6
Issue
I have installed
advisor
throughpip
on a fresh Python 3.7 miniconda installation. Runningadvisor_admin server start
results in the following error:Fix
The error can be resolved by simply changing the following line in
admin_command.py
:to
After that change,
advisor_admin server start
runs on my system without errors.Note that
as
is not supported in Python versions below 2.5 (according to an answer in https://stackoverflow.com/questions/2535760/python-try-except-comma-vs-as-in-except).Pull Request
Note that I have created a pull request for the proposed change.