OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Openstack CLI AttributeError: module 'typing' has no attribute 'Literal'

  • Thread starter Thread starter Unik6065
  • Start date Start date
U

Unik6065

Guest
I am trying to connect to my openstack instance using openstack CLI. I have Python version 3.6.8, and python-openstackclient version 5.8.1, I use pip version 21.3.1 as package manager.

However, when I type "openstack image list", I get this error:

Code:
Traceback (most recent call last):
  File "/home/centos/.virtualenvs/openstack/bin/openstack", line 5, in <module>
    from openstackclient.shell import main
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstackclient/shell.py", line 23, in <module>
    from osc_lib import shell
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/osc_lib/shell.py", line 32, in <module>
    from osc_lib.cli import client_config as cloud_config
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
    from openstack.config import exceptions as sdk_exceptions
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/__init__.py", line 58, in <module>
    import openstack.connection
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/connection.py", line 217, in <module>
    from openstack import _services_mixin
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/_services_mixin.py", line 6, in <module>
    from openstack.block_storage import block_storage_service
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/block_storage_service.py", line 14, in <module>
    from openstack.block_storage.v3 import _proxy as _v3_proxy
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/v3/_proxy.py", line 37, in <module>
    class Proxy(_base_proxy.BaseBlockStorageProxy):
  File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/v3/_proxy.py", line 1592, in Proxy
    ignore_missing: ty.Literal[True] = True,
AttributeError: module 'typing' has no attribute 'Literal'

Does anyone have an idea what it can be, and what can I do in order to fix this?

Thanks
<p>I am trying to connect to my openstack instance using openstack CLI. I have Python version 3.6.8, and python-openstackclient version 5.8.1, I use pip version 21.3.1 as package manager.</p>
<p>However, when I type "openstack image list", I get this error:</p>
<pre><code>Traceback (most recent call last):
File "/home/centos/.virtualenvs/openstack/bin/openstack", line 5, in <module>
from openstackclient.shell import main
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstackclient/shell.py", line 23, in <module>
from osc_lib import shell
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/osc_lib/shell.py", line 32, in <module>
from osc_lib.cli import client_config as cloud_config
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/osc_lib/cli/client_config.py", line 18, in <module>
from openstack.config import exceptions as sdk_exceptions
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/__init__.py", line 58, in <module>
import openstack.connection
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/connection.py", line 217, in <module>
from openstack import _services_mixin
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/_services_mixin.py", line 6, in <module>
from openstack.block_storage import block_storage_service
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/block_storage_service.py", line 14, in <module>
from openstack.block_storage.v3 import _proxy as _v3_proxy
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/v3/_proxy.py", line 37, in <module>
class Proxy(_base_proxy.BaseBlockStorageProxy):
File "/home/centos/.virtualenvs/openstack/lib/python3.6/site-packages/openstack/block_storage/v3/_proxy.py", line 1592, in Proxy
ignore_missing: ty.Literal[True] = True,
AttributeError: module 'typing' has no attribute 'Literal'
</code></pre>
<p>Does anyone have an idea what it can be, and what can I do in order to fix this?</p>
<p>Thanks</p>
 

Latest posts

Top