View Issue Details

IDProjectCategoryView StatusLast Update
0004338Talerobsolete componentpublic2016-03-23 10:22
ReporterChristian Grothoff Assigned ToMarcello Stanisci Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Marcello Stanisci

2016-03-23 09: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 ModifiedUsernameFieldChange
2016-03-23 09:05Christian GrothoffNew Issue
2016-03-23 09:05Christian GrothoffStatusnew => assigned
2016-03-23 09:05Christian GrothoffAssigned To => Marcello Stanisci
2016-03-23 09:46Marcello StanisciNote Added: 0010317
2016-03-23 09:46Marcello StanisciStatusassigned => informing
2016-03-23 09:46Marcello StanisciResolutionopen => fixed
2016-03-23 10:22Christian GrothoffStatusinforming => closed
2016-03-23 10:22Christian GrothoffFixed in Version => 0.0
2022-08-23 18:26Christian GrothoffCategorybank (demonstrator) => py bank (demonstrator, obsolete)
2023-12-03 00:23Christian GrothoffCategorypy bank (demonstrator, obsolete) => obsolete componet
2023-12-11 19:08Florian DoldCategoryobsolete componet => obsolete component