View Issue Details

IDProjectCategoryView StatusLast Update
0004338Talerobsolete componentpublic2016-03-23 11:22
ReporterChristian Grothoff Assigned ToMarcello Stanisci  
PriorityurgentSeverityblockReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Version0.0 
Target Version0.0Fixed in Version0.0 
Summary0004338: bank crashes on /admin/add/incoming
DescriptionRunning the 'test_bank_api' test (taler-exchange/src/bank-lib/), I get:

Waiting for taler-bank-manage to be ready.
[23/Mar/2016 09:02:14] "GET / HTTP/1.1" 200 2307
Internal Server Error: /admin/add/incoming
Traceback (most recent call last):
  File "/home/grothoff/share/talerbank/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/grothoff/share/talerbank/venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/grothoff/share/talerbank/venv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/grothoff/share/talerbank/src/bank_app/funds_mgmt.py", line 82, in add_incoming_attempt
    try: return add_incoming(request)
  File "/home/grothoff/share/talerbank/venv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/grothoff/share/talerbank/src/bank_app/funds_mgmt.py", line 103, in add_incoming
    data = json.loads(request.body)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

Note that the rest of the output is expected:

Mar 23 10:02:14-659922 test-bank-api-15106 ERROR Assertion failed at test_bank_api.c:260.
FAIL test_bank_api (exit status: 1)
TagsNo tags attached.

Activities

Marcello Stanisci

2016-03-23 10:46

reporter   ~0010317

fixed in 2a14aa9 (due to migration to Python 3).
Needed a .decode('utf-8') before loading the gotten JSON

Issue History

Date Modified Username Field Change
2016-03-23 10:05 Christian Grothoff New Issue
2016-03-23 10:05 Christian Grothoff Status new => assigned
2016-03-23 10:05 Christian Grothoff Assigned To => Marcello Stanisci
2016-03-23 10:46 Marcello Stanisci Note Added: 0010317
2016-03-23 10:46 Marcello Stanisci Status assigned => resolved
2016-03-23 10:46 Marcello Stanisci Resolution open => fixed
2016-03-23 11:22 Christian Grothoff Status resolved => closed
2016-03-23 11:22 Christian Grothoff Fixed in Version => 0.0
2022-08-23 20:26 Christian Grothoff Category bank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 01:23 Christian Grothoff Category py bank (demonstrator, obsolete) => obsolete componet
2023-12-11 20:08 Florian Dold Category obsolete componet => obsolete component