{"action":"created","issue":{"url":"https://api.github.com/repos/mytardis/mytardis/issues/498","labels_url":"https://api.github.com/repos/mytardis/mytardis/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/mytardis/mytardis/issues/498/comments","events_url":"https://api.github.com/repos/mytardis/mytardis/issues/498/events","html_url":"https://github.com/mytardis/mytardis/issues/498","id":100218097,"number":498,"title":"DataFile model's cache_file task's argument (self) is not easily pickleable","user":{"login":"wettenhj","id":2209245,"avatar_url":"https://avatars.githubusercontent.com/u/2209245?v=3","gravatar_id":"","url":"https://api.github.com/users/wettenhj","html_url":"https://github.com/wettenhj","followers_url":"https://api.github.com/users/wettenhj/followers","following_url":"https://api.github.com/users/wettenhj/following{/other_user}","gists_url":"https://api.github.com/users/wettenhj/gists{/gist_id}","starred_url":"https://api.github.com/users/wettenhj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wettenhj/subscriptions","organizations_url":"https://api.github.com/users/wettenhj/orgs","repos_url":"https://api.github.com/users/wettenhj/repos","events_url":"https://api.github.com/users/wettenhj/events{/privacy}","received_events_url":"https://api.github.com/users/wettenhj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-11T03:35:25Z","updated_at":"2015-08-11T04:33:24Z","closed_at":null,"body":"Relevant methods:\r\n- cache_dataset in tardis/tardis_portal/views.py\r\n- cache_file in tardis/tardis_portal/models/datafile.py\r\n\r\n```\r\nInternal Server Error: /api/v1/dataset_file/114111/download/\r\nTraceback (most recent call last):\r\n  File \"/home/mytardis/virtualenvs/mytardis/local/lib/python2.7/site-packages/django/core/handlers/base.py\", line 223, in get_response\r\n    response = middleware_method(request, response)\r\n  File \"/home/mytardis/virtualenvs/mytardis/local/lib/python2.7/site-packages/django/middleware/cache.py\", line 103, in process_response\r\n    self.cache.set(cache_key, response, timeout)\r\n  File \"/home/mytardis/virtualenvs/mytardis/local/lib/python2.7/site-packages/django/core/cache/backends/db.py\", line 89, in set\r\n    self._base_set('set', key, value, timeout)\r\n  File \"/home/mytardis/virtualenvs/mytardis/local/lib/python2.7/site-packages/django/core/cache/backends/db.py\", line 115, in _base_set\r\n    pickled = pickle.dumps(value, pickle.HIGHEST_PROTOCOL)\r\nPicklingError: Can't pickle <type 'instancemethod'>: attribute lookup __builtin__.instancemethod failed\r\n\r\nRequest repr():\r\n<WSGIRequest\r\npath:/api/v1/dataset_file/114111/download/,\r\n```"},"comment":{"url":"https://api.github.com/repos/mytardis/mytardis/issues/comments/129699540","html_url":"https://github.com/mytardis/mytardis/issues/498#issuecomment-129699540","issue_url":"https://api.github.com/repos/mytardis/mytardis/issues/498","id":129699540,"user":{"login":"grischa","id":468227,"avatar_url":"https://avatars.githubusercontent.com/u/468227?v=3","gravatar_id":"","url":"https://api.github.com/users/grischa","html_url":"https://github.com/grischa","followers_url":"https://api.github.com/users/grischa/followers","following_url":"https://api.github.com/users/grischa/following{/other_user}","gists_url":"https://api.github.com/users/grischa/gists{/gist_id}","starred_url":"https://api.github.com/users/grischa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grischa/subscriptions","organizations_url":"https://api.github.com/users/grischa/orgs","repos_url":"https://api.github.com/users/grischa/repos","events_url":"https://api.github.com/users/grischa/events{/privacy}","received_events_url":"https://api.github.com/users/grischa/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T04:33:24Z","updated_at":"2015-08-11T04:33:24Z","body":"I thought this happens when it is trying to cache a file download, i.e. `/api/v1/dataset_file/114111/download/`. If file downloads in general are not cached, the problem should not occur. Am I missing something?"}}