{"action":"created","issue":{"url":"https://api.github.com/repos/arteria/django-background-tasks/issues/30","labels_url":"https://api.github.com/repos/arteria/django-background-tasks/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/arteria/django-background-tasks/issues/30/comments","events_url":"https://api.github.com/repos/arteria/django-background-tasks/issues/30/events","html_url":"https://github.com/arteria/django-background-tasks/issues/30","id":102243789,"number":30,"title":"Tasks don't run in Python3","user":{"login":"chadgh","id":33916,"avatar_url":"https://avatars.githubusercontent.com/u/33916?v=3","gravatar_id":"","url":"https://api.github.com/users/chadgh","html_url":"https://github.com/chadgh","followers_url":"https://api.github.com/users/chadgh/followers","following_url":"https://api.github.com/users/chadgh/following{/other_user}","gists_url":"https://api.github.com/users/chadgh/gists{/gist_id}","starred_url":"https://api.github.com/users/chadgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadgh/subscriptions","organizations_url":"https://api.github.com/users/chadgh/orgs","repos_url":"https://api.github.com/users/chadgh/repos","events_url":"https://api.github.com/users/chadgh/events{/privacy}","received_events_url":"https://api.github.com/users/chadgh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-20T21:42:11Z","updated_at":"2015-08-21T16:28:06Z","closed_at":null,"body":"Specifically I'm running a simple email task in python 3.4 and the task doesn't run. When I run the `process_tasks` management command it is just silent. This is even with `--log-level=DEBUG`.\r\n\r\nThe same tasks work fine with Python 2.7."},"comment":{"url":"https://api.github.com/repos/arteria/django-background-tasks/issues/comments/133481894","html_url":"https://github.com/arteria/django-background-tasks/issues/30#issuecomment-133481894","issue_url":"https://api.github.com/repos/arteria/django-background-tasks/issues/30","id":133481894,"user":{"login":"chadgh","id":33916,"avatar_url":"https://avatars.githubusercontent.com/u/33916?v=3","gravatar_id":"","url":"https://api.github.com/users/chadgh","html_url":"https://github.com/chadgh","followers_url":"https://api.github.com/users/chadgh/followers","following_url":"https://api.github.com/users/chadgh/following{/other_user}","gists_url":"https://api.github.com/users/chadgh/gists{/gist_id}","starred_url":"https://api.github.com/users/chadgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadgh/subscriptions","organizations_url":"https://api.github.com/users/chadgh/orgs","repos_url":"https://api.github.com/users/chadgh/repos","events_url":"https://api.github.com/users/chadgh/events{/privacy}","received_events_url":"https://api.github.com/users/chadgh/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T16:28:06Z","updated_at":"2015-08-21T16:28:06Z","body":"I'm not exactly sure what is going on but I did the following to reproduce and this time got an exception (in my actual project, it looks like it is just failing silently).\r\n\r\n1. Created a new django project (called `core`) in its own virtualenv with Python 3.4 and Django 1.7.10.\r\n2. Installed `django-background-tasks`.\r\n3. Created a `tasks.py` file with the simple task:\r\n```\r\n@background\r\ndef test():\r\n    print('done')\r\n````\r\n4. Imported and ran the `test` task from the django shell.\r\n5. Ran `./manage.py process_tasks`\r\n\r\nI get the following exception:\r\n```\r\nTraceback (most recent call last):\r\n  File \"./manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/core/management/__init__.py\", line 377, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/background_task/management/commands/process_tasks.py\", line 81, in handle\r\n    if not tasks.run_next_task():\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/background_task/tasks.py\", line 107, in run_next_task\r\n    return self._runner.run_next_task(self)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/db/transaction.py\", line 394, in inner\r\n    return func(*args, **kwargs)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/background_task/tasks.py\", line 230, in run_next_task\r\n    self.run_task(tasks, task)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/django/db/transaction.py\", line 394, in inner\r\n    return func(*args, **kwargs)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/background_task/tasks.py\", line 220, in run_task\r\n    tasks.run_task(task.task_name, args, kwargs)\r\n  File \"/home/chadgh/.virtualenvs/tmp-3b687c658fb88a5/lib/python3.4/site-packages/background_task/tasks.py\", line 100, in run_task\r\n    proxy_task = self._tasks[task_name]\r\nKeyError: 'core.tasks.test'\r\n```\r\n\r\nI also attempted this whole process by adding the task calling in a view and hitting the view in a running `runserver`, then running the `process_tasks` command. I got the exact same result."}}