0
我一直在執行從外部應用程序在過去12個月沒有問題的特定管理命令。我最近升級到Django的1.5,由於某種原因,它現在拋出:Django 1.5管理命令 - IOError:[Errno 10] - 沒有子進程
IOError: [Errno 10] No child processes
這裏是管理命令:
class Command(BaseCommand):
args = '<camera_id camera_id ...>'
help = 'Checks the alerts table once motion is detected'
def handle(self, *args, **options):
for id in args:
try:
camera = IpCamera.objects.get(pk=id)
#add log
ipcl = IpCameraLog(ipCamera=camera, type='started').save()
#check alerts
except IpCamera.DoesNotExist:
raise CommandError("Camera %s does not exist" % id)
任何人有任何的想法會是什麼造成的?
非常感謝。
非常感謝您的回覆,同樣的錯誤tho :( –
好吧,請確保您添加了__init__.py文件,該文件位於查找該文件的類Command中,這讓django知道它是一個Python包 – drabo2005
管理命令可以在調用外部應用程序的外部正常運行,只有當它在應用程序內部時纔會失敗,當調用時: –