Forum Discussion

Prakash1050's avatar
Prakash1050
Icon for Helper III rankHelper III
2 years ago
Solved

Python Error in PowerBI

Hi Community,      I got these below error to run my first python code in PowerBI.      I don't know what exact error is this.      Can you help me Guys..!!   Feedback Type: Frown (Error) Erro...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Prakash1050 

     

    You received a TypeError with the following description:

    'value' must be an instance of str or bytes, not a float

    This error occurs when you're trying to use a value that is expected to be a string or bytes, but instead, it's a float(a numeric value with decimal points).

    Look at the specific line in your Python script(line 5 in PythonScriptWrapper.PY). Make sure you're not passing a float where a string or bytes should be used.

    If you're working with data, verify that the relevant value is indeed a string or bytes. If it's a float, consider converting it to a string before using it.

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.