Search code examples
pycharmboto3boto

AttributeError: partially initialized module 'boto3' has no attribute 'resource' (most likely due to a circular import)


Im using Pycharm and installed boto3 package and tried to import boto3 and got attribute error. Python.exe file path is given in project interpreter

import boto3

s3 = boto3.resource('s3')

AttributeError: partially initialized module 'boto3' has no attribute 'resource' (most likely due to a circular import)

But the same code working in Python shell


Solution

  • I guess its because of your file name when i tried, i got the same error when renamed the file name. I was able to run the file successfully