Forum Discussion
Python Error: references unknown variable or function 'Python.Execute'
- 6 years ago
Hi, VO
With your provided information, I managed to do it with no error.
I'd like to suggest you go to Option > Preview features and uncheck Store dataset using enhanced metadata format. Then you need to restart Power BI to see if it works.
For further information, you may refer the following links.
Failed to save modifications to the server. function Python.Execute
Using enhanced dataset metadata (preview)
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Allan,
I installed pandas, matplotlib and NumPy. Python scripting is enabled. It actually works in the query editor and gives the expected output. However, it gives an error when I am trying to close and apply the changes.
Hi, VO
With your provided information, I managed to do it with no error.
I'd like to suggest you go to Option > Preview features and uncheck Store dataset using enhanced metadata format. Then you need to restart Power BI to see if it works.
For further information, you may refer the following links.
Failed to save modifications to the server. function Python.Execute
Using enhanced dataset metadata (preview)
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- VO6 years agoHelper I
Hi v-alq-msft
Unfortunately, despite unchecking & restarting. It didn't work. Same error. Did you mange to close and apply the changes (I have the same output you have shared in the query editor)? Are running it on Python version 3.8.2? Thank for the other suggestions, I will explore them.
Error on Close & Aply
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'.'.
Query Editor
- VO6 years agoHelper I
Hi v-alq-msft
Did it all over again, it worked. Thank you.
"Enabling the enhanced dataset metadata feature results in an irreversible upgrade to reports. Any Power BI reports loaded or created with Power BI Desktop, once the enhanced dataset metadata enabled, are irreversibly converted to the enhanced dataset metadat format."