Forum Discussion
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)
I had a similar problem. Just go to Option > Preview features and uncheck Store dataset using enhanced metadata format.
That should do the trick.
8 Replies
- athulbabuakbFrequent 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. - v-lid-msftCommunity Support
- v-lid-msftCommunity 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, - 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.
- AnonymousNot applicable
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".
- v-lid-msftCommunity Support
Hi Anonymous , Paulien_ ,
Could you please try the following steps to see if this error can be reproduced:
- Backup the origin pbix file
- Install the latest version of Power BI Desktop, (if you are using MS Store version, upgrade in MS Store)
- Turn off the Preview Feature "Store datasets using enhanced metadata format" in options.
- Restart Power BI Desktop and create a new blank pbix file
- 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.
- 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,