Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm trying to import data from AWS S3 bucket into power bi using python script. the script works in Power BI desktop, but I encounter data refresh failures after publishing it to PB service.
error message:
"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"ADO.NET: Python script error.\r\nModuleNotFoundError: No module named 'boto3'\r\n</pi>"}}
my python script set up in PB Options and Settings
Based on Python setup in Power BI, I have manually saved the boto3 package in C:\Python311\Lib\site-packages, below is the python script I used to import AWS bucket3 data.
*****************
import pandas as pd
import io
import os
import boto3
....
***************
But the error message seems to suggest it couldn't import boto3. Where should the boto3 package to stored?
Solved! Go to Solution.
Raised a support ticket to Microsoft and heard back that boto3 package is not supported in Power BI. Below is MS response:
I checked your issue with my internal team and got to know that as the boto 3 python package is not listed in the support packages for power BI as per this document (Learn which Python packages are supported - Power BI | Microsoft Learn). For python scripts used in power BI you can install and use the boto 3 in power BI desktop.
Hi @Jeanxyz ,
You can do this by running the following command in your terminal or command prompt:
pip install boto3
This command will help you to install boto3 directly before trying to import boto3
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have done that already. The installation is successful, but data refreshing still showing the same error.
Hi @Jeanxyz ,
If you still report the same error, you can try reading this article:
How To Solve ModuleNotFoundError: No module named in Python (pytutorial.com)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Raised a support ticket to Microsoft and heard back that boto3 package is not supported in Power BI. Below is MS response:
I checked your issue with my internal team and got to know that as the boto 3 python package is not listed in the support packages for power BI as per this document (Learn which Python packages are supported - Power BI | Microsoft Learn). For python scripts used in power BI you can install and use the boto 3 in power BI desktop.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 44 | |
| 40 | |
| 33 | |
| 31 | |
| 23 |
| User | Count |
|---|---|
| 127 | |
| 116 | |
| 90 | |
| 73 | |
| 69 |