question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tasks don't run in Python3

See original GitHub issue

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.

The same tasks work fine with Python 2.7.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
chadghcommented, Aug 24, 2015

settings.py wasn’t changed except for the addition of background_task in the INSTALLED_APPS list.

I’ve reproduced this using the latest from PyPI (django-background-tasks==1.0.5).

1reaction
chadghcommented, Aug 21, 2015

I reduced the task to:

@background
def reindex(a, b):
    print('done')

This works in python 2 when running the process_tasks command. In python 3 it is silent. Num attempts isn’t increased.

I’ll create a django project from scratch in python 3 to see if I can reproduce in the simplest state.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems running python script by windows task scheduler ...
If I run the script manually from the command line, it works fine. New files are downloaded and processed. However, if the Task...
Read more >
Task Scheduler not running the Python script? Try ... - YouTube
Snap! Task Scheduler not running the Python script? Don't worry too much, just watch this video to see how you can fix it....
Read more >
Problem: Windows Task Scheduler will not run a Python script
Try the following steps: a. Try checking on the option in task scheduler: 'Run with highest privileges'. b. Right-click the task in ...
Read more >
Task Scheduler not running the Python script? Try these fixes
1. Start Task Scheduler from Command Line · 2. Check if Task Scheduler is actually running · 3. Run a System File Checker...
Read more >
Python Script Automation Using Task Scheduler (Windows)
To run your python scheduler you will need to create a task, ... but I don't like that option as it requires the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found