Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
zselyke89
New Member

python script editor in powerbi

Feedback Type:
Frown (Error)

Timestamp:
2018-09-06T14:18:14.4352009Z

Local Time:
2018-09-06T16:18:14.4352009+02:00

Session ID:
b413d0ff-8d88-412d-a303-87505dee3b5e

Release:
August 2018

Product Version:
2.61.5192.601 (18.08) (x64)

Error Message:
Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 6, in <module>
matplotlib.pyplot.figure(figsize=(10,1342775581906,5,99110671936759)) please change coma to dot here in this auto generated code, it may solve this issue, or please fix this error with other required changes, thak you!
File "C:\Users\z631251\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\pyplot.py", line 538, in figure
**kwargs)
File "C:\Users\z631251\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 169, in new_figure_manager
fig = fig_cls(*args, **kwargs)
File "C:\Users\z631251\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\figure.py", line 338, in __init__
self.bbox_inches = Bbox.from_bounds(0, 0, *figsize)
TypeError: from_bounds() takes 4 positional arguments but 6 were given


OS Version:
Microsoft Windows NT 10.0.15063.0 (x64 hu-HU)

CLR Version:
4.7 or later [Release Number = 460798]

Peak Virtual Memory:
38.2 GB

Private Memory:
1 GB

Peak Working Set:
1.86 GB

IE Version:
11.1266.15063.0

User ID:
10e56e53-ccc0-4df8-beee-389a49f5cb17

Workbook Package Info:
1* - hu-HU, Query Groups: 1, fastCombine: Disabled, runBackgroundAnalysis: True.

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\z631251\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot1858895217.zip

Performance Trace Logs:
C:\Users\z631251\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Enabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_newFromWeb
PBI_SpanishLinguisticsEnabled
CustomConnectors
PBI_variationUIChange
PBI_canvasTooltips
PBI_PythonSupportEnabled
PBI_showIncrementalRefreshPolicy
PBI_compositeModels
PBI_DB2DQ

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
125%

Supported Services:
Power BI

Formulas:


section Section1;

shared SQP_raw_data_all = let
Source = Csv.Document(File.Contents("C:\Users\z631251\Desktop\Supplier_Quality_final_presentation\SQP_raw_data_all.csv"),[Delimiter=";", Columns=48, Encoding=1250, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Concern Type", type text}, {"QCCAR#", type text}, {"Concern Severity", type text}, {"Concern Source", type text}, {"Controlled Shipment", type text}, {"Concern Days Open", type text}, {"Master Supplier Code", type text}, {"Supplier Code", type text}, {"Supplier Name", type text}, {"Region", type text}, {"Product Line", type text}, {"Product Group", type text}, {"Plant", type text}, {"Corporate Commodity", type text}, {"Sub-Commodity", type text}, {"Part Number", type text}, {"Part Description", type text}, {"Receipt Date", type text}, {"Issue Date", type text}, {"TRW Lot #", type text}, {"Local Reference#", type text}, {"# of Defects", type text}, {"Short Description", type text}, {"TRW Contact", type text}, {"Recurring Concern", type text}, {"Posted", type text}, {"Containment Due Date", type text}, {"Containment Submitted Date", type text}, {"Containment Accepted Date", type text}, {"#of Containment Rejections", type text}, {"Completion Due Date", type text}, {"Completion Submitted Date", type text}, {"Completion Accepted Date", type text}, {"# of Completion Rejections", type text}, {"Concern Status", type text}, {"QCCAR Status", type text}, {"Cost of Quality", type text}, {"Cost Recovery Amount", type text}, {"CR Amount Debited", type text}, {"CR Amount Collected", type text}, {"Unrecovered Cost Recovery Amount", type text}, {"CR Status", type text}, {"CR Initiated Date", type text}, {"Evidence Required", type text}, {"COMMODITY_MANAGER", type text}, {"SR_COMMODITY_MANAGER", type text}, {"AS_RECEIVED_PO_PRICE", type text}, {"COMMODITY_COMMENTS", type text}})
in
#"Changed Type";

shared #"Errors in SQP_raw_data_all" = let
Source = SQP_raw_data_all,
#"Added Index" = Table.AddIndexColumn(Source, "Row Number" ,1),
#"Kept Errors" = Table.SelectRowsWithErrors(#"Added Index", {"Concern Type", "QCCAR#", "Concern Severity", "Concern Source", "Controlled Shipment", "Concern Days Open", "Master Supplier Code", "Supplier Code", "Supplier Name", "Region", "Product Line", "Product Group", "Plant", "Corporate Commodity", "Sub-Commodity", "Part Number", "Part Description", "Receipt Date", "Issue Date", "TRW Lot #", "Local Reference#", "# of Defects", "Short Description", "TRW Contact", "Recurring Concern", "Posted", "Containment Due Date", "Containment Submitted Date", "Containment Accepted Date", "#of Containment Rejections", "Completion Due Date", "Completion Submitted Date", "Completion Accepted Date", "# of Completion Rejections", "Concern Status", "QCCAR Status", "Cost of Quality", "Cost Recovery Amount", "CR Amount Debited", "CR Amount Collected", "Unrecovered Cost Recovery Amount", "CR Status", "CR Initiated Date", "Evidence Required", "COMMODITY_MANAGER", "SR_COMMODITY_MANAGER", "AS_RECEIVED_PO_PRICE", "COMMODITY_COMMENTS"}),
#"Reordered Columns" = Table.ReorderColumns(#"Kept Errors", {"Row Number", "Concern Type", "QCCAR#", "Concern Severity", "Concern Source", "Controlled Shipment", "Concern Days Open", "Master Supplier Code", "Supplier Code", "Supplier Name", "Region", "Product Line", "Product Group", "Plant", "Corporate Commodity", "Sub-Commodity", "Part Number", "Part Description", "Receipt Date", "Issue Date", "TRW Lot #", "Local Reference#", "# of Defects", "Short Description", "TRW Contact", "Recurring Concern", "Posted", "Containment Due Date", "Containment Submitted Date", "Containment Accepted Date", "#of Containment Rejections", "Completion Due Date", "Completion Submitted Date", "Completion Accepted Date", "# of Completion Rejections", "Concern Status", "QCCAR Status", "Cost of Quality", "Cost Recovery Amount", "CR Amount Debited", "CR Amount Collected", "Unrecovered Cost Recovery Amount", "CR Status", "CR Initiated Date", "Evidence Required", "COMMODITY_MANAGER", "SR_COMMODITY_MANAGER", "AS_RECEIVED_PO_PRICE", "COMMODITY_COMMENTS"})
in
#"Reordered Columns"
;

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @zselyke89,

 

Based on the error prompt, please make sure you configure the correct environment in your machine. Also, make sure the script code in file "PythonScriptWrapper.PY" is typed correctly.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.