problem with PORTABLE_BYTES and python3.2
Hi, I'm trying to realize a website that sends a binary file to a
server from the client (both client and server are ladon-based)
Thus, I used the PORTABLE_BYTES data type and tried to send a pdf.
The command I'm using on the client is
WS_client_
(auth_username=
mime_type=
I get this error
TypeError: b'%PDF-
serializable
I digged a bit in the traceback of my application and what I found is that ladon fails when it uses the json encoder from the python library. Particularly, i seems not to be able to encode the bytes data type (you can see it in the traceback, when it refers to /usr/lib/
So my question is: did you ever see any regression with PORTABLE_BYTES and python3? Or am I making a mistake?
Thank you for your help,
Ottavio
Here's my application traceback
File "/tmp/a/
result = handler(request)
File "/tmp/a/
response = handler(request)
File "/tmp/a/
response = view_callable(
File "/tmp/a/
result = view(context, request)
File "/tmp/a/
response = view(request)
File "/tmp/a/
return render_
File "/tmp/a/
return view(context, request)
File "/tmp/a/
result = view(context, request)
File "/tmp/a/
response = view(request)
File "/tmp/a/
i = eval (command)
File "<string>", line 1, in <module>
File "<string>", line 2, in placeholder
File "/tmp/a/
jsonwsp_
File "/usr/lib/
return _default_
File "/usr/lib/
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/
return _iterencode(o, 0)
File "/usr/lib/
raise TypeError(repr(o) + " is not JSON serializable")
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- ladon Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- jsgaarde
- Solved:
- Last query:
- Last reply: