You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was attempting to follow directions for Deploying to Azure; however, there seems to be missing prerequisite steps.
Since I have multiple subscription, I first need to login. However, it seems the file az cli version used is expecting a different file structure than what exists and fails.
Traceback (most recent call last):
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/_session.py", line 37, in load
with open(self.filename, 'r', encoding=self._encoding) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/root/.azure/azureProfile.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/opt/az/lib/python3.11/site-packages/azure/cli/__main__.py", line 39, in <module>
az_cli = get_default_cli()
^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/__init__.py", line 924, in get_default_cli
return AzCli(cli_name='az',
^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/__init__.py", line 79, in __init__
ACCOUNT.load(os.path.join(azure_folder, 'azureProfile.json'))
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/_session.py", line 50, in load
self.save()
File "/opt/az/lib/python3.11/site-packages/azure/cli/core/_session.py", line 54, in save
with open(self.filename, 'w', encoding=self._encoding) as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/root/.azure/azureProfile.json'
Investigation of /root/.azure directory
/root/.azure looks like a symbol link back to the app directory inside the container /app/state/.azure
[Isaac Automator v3.0.0]:~$ ls -la
total 44
drwx------ 1 root root 4096 Jun 11 15:59 .
drwxr-xr-x 1 root root 4096 Jun 11 16:00 ..
drwxr-xr-x 2 root root 4096 Jun 11 15:59 .aliyun
drwxr-xr-x 5 root root 4096 Jun 11 15:58 .ansible
lrwxrwxrwx 1 root root 17 Jun 11 15:57 .azure -> /app/state/.azure
-rw-r--r-- 1 root root 3249 Jun 11 15:59 .bashrc
drwxr-xr-x 1 root root 4096 Jun 11 15:57 .cache
drwxr-xr-x 1 root root 4096 Jun 11 15:59 .config
-rw-r--r-- 1 root root 161 Dec 5 2019 .profile
-rw-r--r-- 1 root root 181 Jun 10 22:51 .wget-hsts
I tried to manually create /app/state/.azure/azureProfile.json; however, az login still fails.
Hmm, I'm not sure what was wrong the first time I tried but I was able to get past the error by starting over and manually creating only the .azure directory in /app/state, but not creating the .json file
[Isaac Automator v3.0.0]:/app$ cd state
[Isaac Automator v3.0.0]:/app/state$ mkdir .azure
[Isaac Automator v3.0.0]:/app/state/.azure$ cd /app
[Isaac Automator v3.0.0]:/app$ az login
I was attempting to follow directions for Deploying to Azure; however, there seems to be missing prerequisite steps.
Since I have multiple subscription, I first need to login. However, it seems the file az cli version used is expecting a different file structure than what exists and fails.
Reproduce Error
Error
Investigation of
/root/.azure
directory/root/.azure
looks like a symbol link back to the app directory inside the container/app/state/.azure
I tried to manually create
/app/state/.azure/azureProfile.json
; however,az login
still fails.Version info
The text was updated successfully, but these errors were encountered: