I get an error about missing region when I run it: triage-oracular+24.10: ~$ apt-cache policy python3-boto3 python3-boto3: Installed: 1.34.46+dfsg-1ubuntu1 Candidate: 1.34.46+dfsg-1ubuntu1 Version table: *** 1.34.46+dfsg-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu oracular/main amd64 Packages 100 /var/lib/dpkg/status
triage-oracular+24.10: ~$ python3 -c 'import boto3; client=boto3.client("ec2")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3/dist-packages/boto3/__init__.py", line 92, in client return _get_default_session().client(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/boto3/session.py", line 299, in client return self._session.create_client( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/session.py", line 997, in create_client client = client_creator.create_client( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/client.py", line 161, in create_client client_args = self._get_client_args( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/client.py", line 508, in _get_client_args return args_creator.get_client_args( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/args.py", line 100, in get_client_args final_args = self.compute_client_args( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/args.py", line 219, in compute_client_args endpoint_config = self._compute_endpoint_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/args.py", line 369, in _compute_endpoint_config return self._resolve_endpoint(**resolve_endpoint_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/args.py", line 474, in _resolve_endpoint return endpoint_bridge.resolve( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/client.py", line 613, in resolve resolved = self.endpoint_resolver.construct_endpoint( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/regions.py", line 229, in construct_endpoint result = self._endpoint_for_partition( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/botocore/regions.py", line 277, in _endpoint_for_partition raise NoRegionError() botocore.exceptions.NoRegionError: You must specify a region. When I specify the region, it runs fine: triage-oracular+24.10: ~$ python3 -c 'import boto3; client=boto3.client("ec2", region_name="us-west-2")' triage-oracular+24.10: ~$ echo $? 0 However, the "cannot import name 'JSONDecodeError' from 'simplejson'" suggests a package installation issue of some sort. Can you try running this? triage-oracular+24.10: ~$ python3 Python 3.12.6 (main, Sep 7 2024, 14:20:15) [GCC 14.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from simplejson import JSONDecodeError >>> >>> Also, do you have python3-simplejson installed on your system? If not, does the issue go away if you manually install it? ** Changed in: python-boto3 (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2081978 Title: boto3 completely unusable: ImportError: cannot import name 'JSONDecodeError' from 'simplejson' (unknown location) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-boto3/+bug/2081978/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs