# python3 AttributeError: No such option: body\_size\_limit

**URL:** <https://discourse.mitmproxy.org/t/python3-attributeerror-no-such-option-body-size-limit/1219>\
**Category:** help\
**Created:** [September 7, 2018, 8:26am UTC](https://discourse.mitmproxy.org/t/python3-attributeerror-no-such-option-body-size-limit/1219 "2018-09-07T08:26:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![foobar](https://avatars.discourse-cdn.com/v4/letter/f/f19dbf/32.png) [@foobar](https://discourse.mitmproxy.org/u/foobar)\
**Post date:** [September 7, 2018, 8:26am UTC](https://discourse.mitmproxy.org/t/python3-attributeerror-no-such-option-body-size-limit/1219/1 "2018-09-07T08:26:22Z")

</div>

Using the following code:

```auto
from mitmproxy import proxy, options
from mitmproxy.tools.dump import DumpMaster
from mitmproxy.addons import core

opts = options.Options(listen_host='127.0.0.1', listen_port=8081)
pconf = proxy.config.ProxyConfig(opts)

m = DumpMaster(None)
m.server = proxy.server.ProxyServer(pconf)
#print(m.addons)
print(m.addons)
#m.addons.add(core.Core())

try:
    m.run()
except KeyboardInterrupt:
    m.shutdown()

```

When running the above the following error is thrown:

```auto
Traceback (most recent call last):
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/server.py", line 121, in handle
    root_layer()
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/modes/http_proxy.py", line 9, in __call__
    layer()
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/protocol/tls.py", line 286, in __call__
    layer()
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/protocol/http1.py", line 83, in __call__
    layer()
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/protocol/http.py", line 188, in __call__
    if not self._process_flow(flow):
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/protocol/http.py", line 254, in _process_flow
    self.read_request_body(f.request)
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/proxy/protocol/http1.py", line 23, in read_request_body
    human.parse_size(self.config.options.body_size_limit)
  File "/home/userone/dev/p3_going_headless/venv/lib/python3.6/site-packages/mitmproxy/optmanager.py", line 172, in __getattr__
    raise AttributeError("No such option: %s" % attr)
AttributeError: No such option: body_size_limit

mitmproxy has crashed!
Please lodge a bug report at: https://github.com/mitmproxy/mitmproxy
127.0.0.1:48110: clientdisconnect

```

According to the following a simple m.addons.add(core.Core()) should fix this however as can be seen in the addon list Core is already loaded:

`'<mitmproxy.addons.core.Core object at 0x7f1521916e48>',`

Any suggestions would be welcome, it seems to be a similar issue as posted here:

> <https://stackoverflow.com/questions/52107026/mitmproxy-how-to-launch-from-script-and-save-dumps-to-file>

##### System information

python version: Python 3.6.5  
mitmproxy ver: 4.0.4 (latest)

---

<div class="post-metadata">

**Author:** ![razaborg](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/razaborg/32/361_2.png) [@razaborg](https://discourse.mitmproxy.org/u/razaborg)\
**Post date:** [October 25, 2018, 10:55am UTC](https://discourse.mitmproxy.org/t/python3-attributeerror-no-such-option-body-size-limit/1219/2 "2018-10-25T10:55:49Z")

</div>

Exact same issue for me ☹
