Skip to content

maximum recursion depth exceeded on LineChart #141

Open
@lengzuo

Description

@lengzuo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions