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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
apods1979
Helper I
Helper I

Failed to save modifications to the server. function Python.Execute

Complete error: Failed to save modifications to the server. Error returned: 'Expression in partition 'n/a' in table 'n/a' references unknown variable or function 'Python.Execute'.

 

I have this error after used this script to load data:
OBS: This script working in COLAB and Python at my machine, but not in Power Query 😥

 

Script:

# 'dataset' holds the input data for this script
import numpy as np
import pandas as pd
from pandas_datareader import data as wb
TickerA='ITSA4.SA'
TickerB='FLRY3.SA'
TickerC='LREN3.SA' 
dataset=pd.DataFrame()
tickers = [TickerA, TickerB, TickerC]
for t in tickers:
dataset[t]=wb.DataReader(t, data_source='yahoo', start='2019-1-1')['Adj Close']
dataset= dataset.reset_index()
dataset= dataset.set_index([dataset.index])
dataset= dataset.fillna(0) 

2 ACCEPTED SOLUTIONS
v-lid-msft
Community Support
Community Support

Hi @apods1979 ,

 

Sorry for our poor python knowledge, Is "dataset[t]=XXX" a nested tables? Based on this document, Nested tables are currently not supported. 


Best regards,

 

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

View solution in original post

athulbabuakb
Frequent Visitor

I had a similar problem. Just go to Option > Preview features and uncheck Store dataset using enhanced metadata format.
That should do the trick.

View solution in original post

8 REPLIES 8
dshutev
New Member

Hey guys, really struggling with this error, any other ideas on how to fix it? I've already tried "Store datasets using enhanced metadata format".

 

QueryChanges.PNG

Hi @dshutev , @Paulien_ ,

 

Could you please try the following steps to see if this error can be reproduced:

  1. Backup the origin pbix file
  2. Install the latest version of Power BI Desktop, (if you are using MS Store version, upgrade in MS Store)
  3. Turn off the Preview Feature "Store datasets using enhanced metadata format" in options.
  4. Restart Power BI Desktop and create a new blank pbix file
  5. Try to copy the queries from origin pbix file to the new file when save the query (instead of using the old pbix file), or just write new query in the blank pbix file.
  6. Then verify if this error occur in the new pbix file

 

If it is an urgent issue, We suggest you to open a ticket here for help if you are a pro user: https://powerbi.microsoft.com/en-us/support/


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Paulien_
Frequent Visitor

I run into the same problem. Even when the python script is only: df = dataset, it still returns the error " Failed to save modifications to the server. Error returned: 'Expression in partition 'n/a' in table 'n/a' references unknown variable or function 'Python.Execute'. '." when I try to apply the query. 

v-lid-msft
Community Support
Community Support

Hi @apods1979 ,

 

Does this issue have been resolved? How about the result after you follow the suggestions mentioned by @athulbabuakb? Could you please provide more details about it If it still not be resolved? Please don't contain any Confidential Information or Real data in your reply.


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
athulbabuakb
Frequent Visitor

I had a similar problem. Just go to Option > Preview features and uncheck Store dataset using enhanced metadata format.
That should do the trick.

Thank you this works for me as well.

Thank you, that work for me too...

v-lid-msft
Community Support
Community Support

Hi @apods1979 ,

 

Sorry for our poor python knowledge, Is "dataset[t]=XXX" a nested tables? Based on this document, Nested tables are currently not supported. 


Best regards,

 

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.