Recommenders: Why databricks feedback CLIError:Please run 'az login' to setup account?

Created on 11 Feb 2019  路  9Comments  路  Source: microsoft/recommenders

client = get_client_from_cli_profile(azure.mgmt.cosmosdb.CosmosDB)
above code feedback CLIError:Please run 'az login' to setup account,but in offline notebook jupyter is normal.
pleas help m, thanks!

Most helpful comment

@harbourlga the AML workspace creation code should give you a URL to authenticate your Azure account in the cell output - did you try restarting / rerunning the notebook? If that doesn't work, try adding in a new cell in Databricks and do the following to login manually:

%sh
pip install azure-cli
az login

All 9 comments

is this happening on Databricks?

Yes,databricks

have you run the notebook from the top and logged in when starting the AML workspace? This assumes you have already logged in, in a previous step.

i had try run 'az login' on Cloud Shell , on databricks no solve

@harbourlga the AML workspace creation code should give you a URL to authenticate your Azure account in the cell output - did you try restarting / rerunning the notebook? If that doesn't work, try adding in a new cell in Databricks and do the following to login manually:

%sh
pip install azure-cli
az login

thank you!

also see #529

Closing this since the issue is solved. Feel free to reopen in case it is needed

@harbourlga the AML workspace creation code should give you a URL to authenticate your Azure account in the cell output - did you try restarting / rerunning the notebook? If that doesn't work, try adding in a new cell in Databricks and do the following to login manually:

%sh
pip install azure-cli
az login

Traceback (most recent call last):
File "/databricks/python2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/databricks/python2/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/databricks/python2/lib/python2.7/site-packages/azure/cli/__main__.py", line 33, in
az_cli = get_default_cli()
File "/databricks/python2/lib/python2.7/site-packages/azure/cli/core/__init__.py", line 599, in get_default_cli
from azure.cli.core.azlogging import AzCliLogging
File "/databricks/python2/lib/python2.7/site-packages/azure/cli/core/azlogging.py", line 30, in
from azure.cli.core.commands.events import EVENT_INVOKER_PRE_CMD_TBL_TRUNCATE
File "/databricks/python2/lib/python2.7/site-packages/azure/cli/core/commands/__init__.py", line 425
def cached_put(cmd_obj, operation, parameters, args, setter_arg_name='parameters', *kwargs):
^
SyntaxError: invalid syntax

I am getting this error when I add this cell. The installation command works fine but all az commands give this error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karthikraja95 picture karthikraja95  路  3Comments

seancaodo picture seancaodo  路  3Comments

anargyri picture anargyri  路  4Comments

luiscastro193 picture luiscastro193  路  5Comments

anargyri picture anargyri  路  3Comments