django-wiki / django-nyt

Notification system for Django with batteries included: Email digests, user settings, JSON API
Apache License 2.0
144 stars 47 forks source link

Notifymail command craches #37

Closed elbakouchi closed 6 years ago

elbakouchi commented 7 years ago

I had this error when trying to run the command notifymail on my local windows 7 machine under python 3.5 and pdb ` Entering send-loop, CTRL+C to exit Traceback (most recent call last): File "d:\Python35\Lib\pdb.py", line 1661, in main pdb._runscript(mainpyfile) File "d:\Python35\Lib\pdb.py", line 1542, in _runscript self.run(statement) File "d:\Python35\Lib\bdb.py", line 431, in run exec(cmd, globals, locals) File "", line 1, in File "d:\l2e\vip\manage.py", line 2, in import os File "D:\l2e\env\lib\site-packages\django\core\management__init__.py", line 363, in execute_from_command_line utility.execute() File "D:\l2e\env\lib\site-packages\django\core\management__init__.py", line 355, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "D:\l2e\env\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv self.execute(*args, *cmd_options) File "D:\l2e\env\lib\site-packages\django\core\management\base.py", line 330, in execute output = self.handle(args, **options) File "D:\l2e\env\lib\site-packages\django_nyt\management\commands\notifymail.py", line 136, in handle self.send_loop(connection, int(options['sleep_time'])) KeyError: 'sleep_time' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program

d:\l2e\env\lib\site-packages\django_nyt\management\commands\notifymail.py(136)handle() -> self.send_loop(connection, int(options['sleep_time'])) (Pdb) self <django_nyt.management.commands.notifymail.Command object at 0x00000000045E21D0> (Pdb) connection <django.core.mail.backends.smtp.EmailBackend object at 0x00000000062BF0F0> (Pdb) options {'no_color': False, 'traceback': False, 'pythonpath': None, 'verbosity': 1, 'no_sys_exit': False, 'cron': False, 'settings': None, 'daemon': False} (Pdb)

` Could you see please?

timeyyy commented 7 years ago

The tests on travis.ci are green. however there is an error which has been happening since this commit (you can see it in the log), it happens when running on my local ubuntu machine as well. https://travis-ci.org/benjaoming/django-nyt/jobs/222360002



ERROR: test_notifymail (django_nyt.tests.test_management.CommandTest)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/home/travis/build/benjaoming/django-nyt/django_nyt/tests/test_management.py", line 37, in test_notifymail

    call_command('notifymail', daemon=True, pid=pid_file.name, no_sys_exit=False)

  File "/home/travis/build/benjaoming/django-nyt/.tox/py35-django111/lib/python3.5/site-packages/django/core/management/__init__.py", line 130, in call_command

    return command.execute(*args, **defaults)

  File "/home/travis/build/benjaoming/django-nyt/.tox/py35-django111/lib/python3.5/site-packages/django/core/management/base.py", line 330, in execute

    output = self.handle(*args, **options)

  File "/home/travis/build/benjaoming/django-nyt/django_nyt/management/commands/notifymail.py", line 136, in handle

    self.send_loop(connection, int(options['sleep_time']))

KeyError: 'sleep_time'```
timeyyy commented 6 years ago

This could be closed now

benjaoming commented 6 years ago

Oh right, thanks @timeyyy :)