# Serializing cpyamf.util.BufferedByteStream leads to crash

**URL:** https://discourse.mitmproxy.org/t/serializing-cpyamf-util-bufferedbytestream-leads-to-crash/886
**Category:** Uncategorized
**Created:** [March 4, 2018, 7:43am UTC](https://discourse.mitmproxy.org/t/serializing-cpyamf-util-bufferedbytestream-leads-to-crash/886 "2018-03-04T07:43:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![internety](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/internety/32/27_2.png) [@internety](https://discourse.mitmproxy.org/u/internety)
#### Post date: [March 4, 2018, 7:43am UTC](https://discourse.mitmproxy.org/t/serializing-cpyamf-util-bufferedbytestream-leads-to-crash/886/1 "2018-03-04T07:43:35Z")

</div>

I know that I am using mitmproxy version that someone could describe as ancient, that’s due to strong coupling with software I use. But it seems that problem I am going to ask about is really not mitmproxy issue.

```
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/server.py", line 121, in handle
    root_layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/modes/http_proxy.py", line 25, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/tls.py", line 358, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http1.py", line 67, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 192, in __call__
    self.get_response_from_server(flow)
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 294, in get_response_from_server
    get_response()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 290, in get_response
    self.send_request(flow.request)
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http1.py", line 25, in send_request
    self.server_conn.wfile.write(http1.assemble_request(request))
  File "/usr/local/lib/python2.7/dist-packages/netlib/http/http1/assemble.py", line 11, in assemble_request
    body = b"".join(assemble_body(request.data.headers, [request.data.content]))
TypeError: sequence item 0: expected string, cpyamf.util.BufferedByteStream found

mitmproxy has crashed!
Please lodge a bug report at: https://github.com/mitmproxy/mitmproxy
127.0.0.1:47710: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/server.py", line 121, in handle
    root_layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/proxy/modes/http_proxy.py", line 25, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/tls.py", line 358, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http1.py", line 67, in __call__
    layer()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 192, in __call__
    self.get_response_from_server(flow)
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 294, in get_response_from_server
    get_response()
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http.py", line 290, in get_response
    self.send_request(flow.request)
  File "/usr/local/lib/python2.7/dist-packages/mitmproxy/protocol/http1.py", line 25, in send_request
    self.server_conn.wfile.write(http1.assemble_request(request))
  File "/usr/local/lib/python2.7/dist-packages/netlib/http/http1/assemble.py", line 11, in assemble_request
    body = b"".join(assemble_body(request.data.headers, [request.data.content]))
TypeError: sequence item 0: expected string, cpyamf.util.BufferedByteStream found
```
