Skip to content

cache.get entire Chart object fails #10

@atodorov

Description

@atodorov
    chart = Chart(
            datasource = metricsdata,
            series_options = [
                {'options': {
                        'type': 'line',
                        'stacking': False,
                    },
                    'terms': chart_terms
                }
            ],
            chart_options = {
                'title': { 'text': 'Metrics - Last 30 days'},
                'xAxis': { 'title': {'text': 'Date'}},
                'yAxis': { 'title': {'text': 'Count'}},
            }
        )

cache.set works fine.

cache.get OTOH:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/lib/python2.6/site-packages/s3cache/__init__.py", line 98, in get
    return pickle.load(f)
  File "lib/python2.6/site-packages/chartit/utils.py", line 24, in __init__
    self.update(self.data)
  File "lib/python2.6/site-packages/chartit/utils.py", line 40, in update
TypeError: ("descriptor 'keys' of 'dict' object needs an argument", <class 'chartit.highcharts.hcoptions.HCOptions'>, (<class 'chartit.highcharts.hcoptions.HCOptions'>,))

Where s3cache is a custom cache backend (https://github.com/atodorov/django-s3-cache) similar to the filesystem cache backend but stores data in Amazon S3.

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