Forum Discussion
Can't run any Python script
- Anonymous7 years ago
Hi Dale,
I've found out what the problem is and there is a work-around. I have a Dutch version of Windows. Comma-decimal is standard on my system. In the settings i've chaged it to point-decimal. But it would be nice if the python-visual works the same as the R-visual. When I use the R-visual I don't have the problem with comma- or point decima.
The error that I have is in row 6 of the script. And that is a row that python automatically generates when I open the python-visual.
I use the latest version of anaconda.
Regards,
Paul
In Python, a comma separates arguments in a list of arguments. Float literals are always written with a decimal point.
In this case you are sending figsize = (4, ERROR, 3, 78427344733141)
In this case I am saying ERROR because number literals in python that begin with 0 should be expressed in octal (base 8) and the two 8s in the number make it an invalid literal, which is what the compiler is complaining about.
You need to rewrite that with decimal points.
If you need to conver between decimal commas and decimal points, have a look at the locale module in python.
The problem is that I can't change that part of script. It's something within the Python visual. I think it's a bug in Power BI. Do you (or anyone else) know where I can address this bug?
Thanks,
Paul