Forum Discussion
Python Error in PowerBI
- Anonymous2 years ago
Hi Prakash1050
You received a TypeError with the following description:
'value' must be an instance of str or bytes, not a floatThis 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.
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.