{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/luigi/issues/995","labels_url":"https://api.github.com/repos/spotify/luigi/issues/995/labels{/name}","comments_url":"https://api.github.com/repos/spotify/luigi/issues/995/comments","events_url":"https://api.github.com/repos/spotify/luigi/issues/995/events","html_url":"https://github.com/spotify/luigi/issues/995","id":85738760,"number":995,"title":"S3CopyToTable.s3_load_path TypeError","user":{"login":"kianho","id":783366,"avatar_url":"https://avatars.githubusercontent.com/u/783366?v=3","gravatar_id":"","url":"https://api.github.com/users/kianho","html_url":"https://github.com/kianho","followers_url":"https://api.github.com/users/kianho/followers","following_url":"https://api.github.com/users/kianho/following{/other_user}","gists_url":"https://api.github.com/users/kianho/gists{/gist_id}","starred_url":"https://api.github.com/users/kianho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kianho/subscriptions","organizations_url":"https://api.github.com/users/kianho/orgs","repos_url":"https://api.github.com/users/kianho/repos","events_url":"https://api.github.com/users/kianho/events{/privacy}","received_events_url":"https://api.github.com/users/kianho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-06T11:22:29Z","updated_at":"2015-06-06T11:34:47Z","closed_at":null,"body":"I encountered this `TypeError` when subclassing `S3CopyToTable`:\r\n```\r\n...\r\nTraceback (most recent call last):\r\n  File \"/home/kian/workspaces/contrib/luigi/luigi/worker.py\", line 137, in run\r\n    new_deps = self._run_get_new_deps()\r\n  File \"/home/kian/workspaces/contrib/luigi/luigi/worker.py\", line 88, in _run_get_new_deps\r\n    task_gen = self.task.run()\r\n  File \"/home/kian/workspaces/contrib/luigi/luigi/contrib/redshift.py\", line 166, in run\r\n    path = self.s3_load_path()\r\nTypeError: 'str' object is not callable\r\nINFO: Skipping error email. Set `error-email` in the `core` section of the luigi config file to receive error emails.\r\nDEBUG: 1 running tasks, waiting for next task to finish\r\nDEBUG: Asking scheduler for work...\r\nINFO: Done\r\nINFO: There are no more tasks to run at this time\r\nINFO: Worker Worker(salt=532581476, workers=1, host=..., username=kian, pid=23435) was stopped. Shutting down Keep-Alive thread\r\n```\r\nwhich can be easily fixed by changing https://github.com/spotify/luigi/blob/master/luigi/contrib/redshift.py#L166 from:\r\n```python\r\npath = self.s3_load_path()\r\n``` \r\nto\r\n```python\r\npath = self.s3_load_path\r\n```\r\nas per the other class properties.\r\n\r\nThe snippet I used to generate the above error:\r\n```python\r\nimport luigi\r\n    \r\nfrom luigi.s3 import S3Target, S3Client                                                                          \r\nfrom luigi.contrib.redshift import S3CopyToTable                                                                 \r\n    \r\n    \r\nclass MyS3Task(luigi.Task): \r\n    local_tsv = luigi.Parameter()\r\n    s3_load_path = luigi.Parameter()                                                                             \r\n    client = luigi.Parameter()\r\n    \r\n    def output(self):\r\n        return S3Target(self.s3_load_path, client=self.client)\r\n\r\n    def run(self):\r\n        self.client.put(self.local_tsv, self.output().path)\r\n        return\r\n\r\n\r\nclass MyRedshiftTask(S3CopyToTable):\r\n    host = luigi.Parameter()\r\n    database = luigi.Parameter()\r\n    user = luigi.Parameter()\r\n    password = luigi.Parameter()\r\n    table = luigi.Parameter()\r\n    local_tsv = luigi.Parameter()\r\n\r\n    aws_access_key_id = luigi.Parameter()\r\n    aws_secret_access_key = luigi.Parameter()\r\n\r\n    columns = [(\"x\", \"INT\"),\r\n               (\"y\", \"INT\")]\r\n\r\n    s3_load_path = luigi.Parameter()\r\n    copy_options = \"IGNOREHEADER 1\"\r\n\r\n    def requires(self):\r\n        client = S3Client(self.aws_access_key_id, self.aws_secret_access_key)\r\n        return MyS3Task(s3_load_path=self.s3_load_path,\r\n                        local_tsv=self.local_tsv, client=client)\r\n\r\n\r\nif __name__ == '__main__':\r\n    luigi.run()\r\n```\r\nwhich was run from the command line using:\r\n```bash\r\npython ./luigi_example.py --local-scheduler MyRedshiftTask \\\r\n    --host \"<REDSHIFT ENDPOINT>:5439\" \\\r\n    --database \"dev\" \\\r\n    --user \"<USERNAME>\" \\\r\n    --password \"<HIDDEN>\" \\\r\n    --table \"test_redshift_table_5439\" \\\r\n    --aws-access-key-id \"<HIDDEN>\" \\\r\n    --aws-secret-access-key \"<HIDDEN>\" \\\r\n    --s3-load-path \"s3://bucket-5439/test.tsv\" \\\r\n    --local-tsv \"./test.tsv\" \\\r\n```\r\nwhere `test.tsv` (tab-separated values) contained:\r\n```\r\nx   y\r\n1   2\r\n10  20\r\n100 200\r\n```\r\nI encountered the following TypeError:\r\n"},"comment":{"url":"https://api.github.com/repos/spotify/luigi/issues/comments/109569462","html_url":"https://github.com/spotify/luigi/issues/995#issuecomment-109569462","issue_url":"https://api.github.com/repos/spotify/luigi/issues/995","id":109569462,"user":{"login":"kianho","id":783366,"avatar_url":"https://avatars.githubusercontent.com/u/783366?v=3","gravatar_id":"","url":"https://api.github.com/users/kianho","html_url":"https://github.com/kianho","followers_url":"https://api.github.com/users/kianho/followers","following_url":"https://api.github.com/users/kianho/following{/other_user}","gists_url":"https://api.github.com/users/kianho/gists{/gist_id}","starred_url":"https://api.github.com/users/kianho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kianho/subscriptions","organizations_url":"https://api.github.com/users/kianho/orgs","repos_url":"https://api.github.com/users/kianho/repos","events_url":"https://api.github.com/users/kianho/events{/privacy}","received_events_url":"https://api.github.com/users/kianho/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T11:34:46Z","updated_at":"2015-06-06T11:34:46Z","body":"ah yes of course, @ddaniels888 @rantav \r\nthanks!"}}