'Braket' object has no attribute 'get_device'
See original GitHub issueDescribe the bug When executing the example bell.py, the following error appears:
AttributeError Traceback (most recent call last) <ipython-input-2-33823a40ea20> in <module> 19 aws_account_id = boto3.client(“sts”).get_caller_identity()[“Account”] 20 —> 21 device = AwsDevice(“arn:aws:braket:::device/quantum-simulator/amazon/sv1”) 22 s3_folder = (f"amazon-braket-output-{aws_account_id}", “folder-name”) 23
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_device.py in init(self, arn, aws_session) 74 self._provider_name = None 75 self._type = None —> 76 self.refresh_metadata() 77 78 def run(
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_device.py in refresh_metadata(self)
153 Refresh the AwsDevice
object with the most recent Device metadata.
154 “”"
–> 155 metadata = self._aws_session.get_device(self._arn)
156 self._name = metadata.get(“deviceName”)
157 self._status = metadata.get(“deviceStatus”)
~/braketvirtenv/lib/python3.7/site-packages/braket/aws/aws_session.py in get_device(self, arn) 116 Dict[str, Any]: Device metadata 117 “”" –> 118 return self.braket_client.get_device(deviceArn=arn)
~/braketvirtenv/lib/python3.7/site-packages/botocore/client.py in getattr(self, item) 573 raise AttributeError( 574 “‘%s’ object has no attribute ‘%s’” % ( –> 575 self.class.name, item) 576 ) 577
AttributeError: ‘Braket’ object has no attribute ‘get_device’
To reproduce Execute bell.py
Expected behavior Get the result of the experiment
System information A description of your system. Please provide:
- Amazon Braket Python SDK version: v1.0.0.post1
- Amazon Braket Python Schemas version: v1.0.0.post1
- Amazon Braket Python Default Simulator version: v1.0.0.post1
- Python version: 3.7.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@NicoSchwaller does removal of any aws cli models, uninstallation, and re-installation help resolve the issue? These are the commands that solved the issue for myself
Yes, this did solve the problem, thanks a lot!