View Issue Details

IDProjectCategoryView StatusLast Update
0005175Talerbank (demonstrator)public2018-04-15 20:34
ReporterChristian GrothoffAssigned ToMarcello Stanisci 
PriorityurgentSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product VersionSVN HEAD 
Target Version0.5Fixed in Version0.5 
Summary0005175: make check fails to complete
DescriptionI've been unable to run the bank's test cases on my machine for a while. First, what was missing is that I had to manually run:

$ pip3 install validictory
$ pip3 install django-simple-math-captcha

I'm not sure if this is what is supposed to happen, but bootstrap/configure/make install/make check ran into packages missing without it. I thought the crazy Python machinery was supposed to take care of this?

After this, I get a much more crazy error:

2017-11-11 17:38:37,364 settings INFO DJANGO_SETTINGS_MODULE: talerbank.settings
2017-11-11 17:38:37,365 settings INFO secret key not configured in TALER_BANK_SECRET_KEY env variable, generating random secret
2017-11-11 17:38:37,366 settings INFO dbname: postgres:///talercheck
Creating test database for alias 'default'...
Got an error creating the test database: database "test_talercheck" already exists

Type 'yes' if you would like to try deleting the test database 'test_talercheck', or 'no' to cancel: yes
Destroying old test database for alias 'default'...
Traceback (most recent call last):
  File "/home/grothoff/research/taler/bank/talerbank/app/checks.py", line 10, in example_check
    User.objects.get(username='Bank')
  File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 380, in get
    self.model._meta.object_name
django.contrib.auth.models.DoesNotExist: User matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/django/__main__.py", line 9, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python3/dist-packages/django/core/management/commands/test.py", line 29, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3/dist-packages/django/core/management/commands/test.py", line 62, in handle
    failures = test_runner.run_tests(test_labels)
  File "/usr/lib/python3/dist-packages/django/test/runner.py", line 602, in run_tests
    self.run_checks()
  File "/usr/lib/python3/dist-packages/django/test/runner.py", line 562, in run_checks
    call_command('check', verbosity=self.verbosity)
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 131, in call_command
    return command.execute(*args, **defaults)
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python3/dist-packages/django/core/management/commands/check.py", line 68, in handle
    fail_level=getattr(checks, options['fail_level']),
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 346, in _run_checks
    return checks.run_checks(**kwargs)
  File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/grothoff/research/taler/bank/talerbank/app/checks.py", line 16, in example_check
    id='talerbank.E001'
TypeError: Warning does not take keyword arguments
Makefile:866: recipe for target 'check' failed

I don't know what's going wrong there. Please investigate!

Finally, 'make check' should not interactively ask the user about this DB issue. It's a test DB, so IMO it should just drop it (do 'yes'), instead of asking.
TagsNo tags attached.

Activities

Marcello Stanisci

2017-11-20 18:38

manager   ~0012591

By commit dee02165b9bba.., the bank should destroy pre-existing name-clashing databases by default (upon 'make dist'), and not explode as in the stacktraces you pasted.

The latter happened because the bank logic wanted to instantiate some object X that appear to exist natively in Python, whereas it should have imported it from django; not sure why this popped out now, though.

As of the missing packages, the bank's setup.py does include 'validictory' and 'django-simple-math-captcha' among the required packages. Maybe, your 'make install' did install those, but (for some reason) your 'make check' used another installation. It can be worth noting that 'make check' uses the code from within the working directory.

If you run again into this package missing problem, consider also simply running the bank, with

$ taler-bank-manage serve-http

and see if it complains.

Anyway, let's consider this fix UNOFFICIAL and wait next Wednesday to go over it.

Issue History

Date Modified Username Field Change
2017-11-11 17:42 Christian Grothoff New Issue
2017-11-11 17:42 Christian Grothoff Status new => assigned
2017-11-11 17:42 Christian Grothoff Assigned To => Marcello Stanisci
2017-11-20 18:38 Marcello Stanisci Note Added: 0012591
2017-12-14 15:53 Christian Grothoff Target Version => 0.6
2017-12-28 15:21 Christian Grothoff Status assigned => resolved
2017-12-28 15:21 Christian Grothoff Resolution open => fixed
2017-12-28 15:21 Christian Grothoff Fixed in Version => 0.5
2017-12-28 15:24 Christian Grothoff Target Version 0.6 => 0.5
2018-04-15 20:34 Christian Grothoff Status resolved => closed