Jun-11-2024, 01:38 PM
I actually succeeded to run the file by using quotation marks instead of the "%20" encoding reference, however, another error message was rendered when running the file:
Here is the code contained in the file that was run through the "py" command:
C:\Users>py "C:\Users\ibrah\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.12\Waterfall Plot.py"
Error:File "C:\Users\ibrah\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.12\Waterfall Plot.py", line 9
connector = "line":{"color":"rgb(63, 63, 63)"},)
SyntaxError: closing parenthesis ')' does not match opening parenthesis '[' on line 4
The first element referred to by the "SyntaxError" message is a parenthesis while the second one is actually a hook. There might be a confusion between both elements.Here is the code contained in the file that was run through the "py" command:
import plotly.graph_objects as go fig = go.Figure(go.Waterfall( measure = ["relative", "relative", "total", "relative", "relative, "total"] "Sales x = ["Sales", "Consulting", "Net revenue", "Purchases", "Other Expenses", "Profit Before Tax"], textposition = "outside" text = ["+60", "+80", "" "-40", "-20", "Total"] y = [60, 80, 0, -40, -20, 0] connector = "line":{"color":"rgb(63, 63, 63)"},)