You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
[Previous line repeated 930 more times]
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 17, in LineChart
data_source = SimpleDataSource(data=data)
RecursionError: maximum recursion depth exceeded
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 20, in LineChart
chart = LineChart(data_source)
[Previous line repeated 930 more times]
File "/Users/lengzuo/Desktop/sreport/reports/views.py", line 17, in LineChart
data_source = SimpleDataSource(data=data)
RecursionError: maximum recursion depth exceeded
Code as below:
def LineChart(request): data = [ ['Year', 'Sales', 'Expenses', 'Items Sold', 'Net Profit'], ['2004', 1000, 400, 100, 600], ['2005', 1170, 460, 120, 710], ['2006', 660, 1120, 50, -460], ['2007', 1030, 540, 100, 490], ] # DataSource object data_source = SimpleDataSource(data=data) print('data :%s ' % data_source) # Chart object chart = LineChart(data_source) context = {'chart': chart} return render(request, 'index.html', context)
The text was updated successfully, but these errors were encountered: