Forum Discussion

Developer1128's avatar
Developer1128
New Member
11 days ago
Solved

python visual question

hello all, i am trying to get a python visual to render at all, i am getting an error like this.

 

 

the dataset i am using is the basic titanic dataset. i also did not even write a single line of code, i just try to hit the check button.

  • Hi Developer1128​,

    I would check the data/model side before assuming this is a Python installation problem.

    The error in your screenshot is:

    ServiceError_ExecuteSemanticQueryTransformError

    and because you said you have not written any Python code yet, the failure may be happening while Power BI is preparing the dataset for the Python visual.

    Microsoft documents that Python visuals can fail if the fields used in the visual come from different tables without a valid relationship between them.

    I would test in this order:

    1. Create a completely new Python visual.
    2. Add only one simple numeric column from a single table.
    3. Do not add fields from multiple tables yet.
    4. Try rendering the visual again.


    If that works, then add the remaining fields one at a time.

    If even a single-column visual fails, then check the Python configuration:

    File -> Options and settings -> Options -> Python scripting

    and make sure Power BI points to a valid local Python installation.

    Microsoft also requires pandas and matplotlib for Python visuals. The setup is documented in the Python scripting guidance.

    The Python visual documentation also confirms that model relationships can cause errors before the Python script itself is evaluated.

    So I would separate the test into:

    single table / single field fails
    -> check Python installation and packages
    
    single field works, adding other fields fails
    -> check model relationships and field types

    Since this happens before you have written any Python code, I would not blame the Titanic dataset itself yet.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

4 Replies

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi Developer1128​,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. 

    Thank you.

  • hi Developer1128​ 
    did you configure python correctly in options and settings? also check your installation path
    try checking with normal dataset instead of titanic dataset. 

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi Developer1128​,

    I would check the data/model side before assuming this is a Python installation problem.

    The error in your screenshot is:

    ServiceError_ExecuteSemanticQueryTransformError

    and because you said you have not written any Python code yet, the failure may be happening while Power BI is preparing the dataset for the Python visual.

    Microsoft documents that Python visuals can fail if the fields used in the visual come from different tables without a valid relationship between them.

    I would test in this order:

    1. Create a completely new Python visual.
    2. Add only one simple numeric column from a single table.
    3. Do not add fields from multiple tables yet.
    4. Try rendering the visual again.


    If that works, then add the remaining fields one at a time.

    If even a single-column visual fails, then check the Python configuration:

    File -> Options and settings -> Options -> Python scripting

    and make sure Power BI points to a valid local Python installation.

    Microsoft also requires pandas and matplotlib for Python visuals. The setup is documented in the Python scripting guidance.

    The Python visual documentation also confirms that model relationships can cause errors before the Python script itself is evaluated.

    So I would separate the test into:

    single table / single field fails
    -> check Python installation and packages
    
    single field works, adding other fields fails
    -> check model relationships and field types

    Since this happens before you have written any Python code, I would not blame the Titanic dataset itself yet.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

  • v-abhinavmu's avatar
    v-abhinavmu
    Icon for Community Support rankCommunity Support

    Hi Developer1128​,

    May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.

    Thank you