<div dir="ltr"><div><div>Hi,<br><br></div>As Phill has mentioned on IRC, this can be solved by specifying args as keywords. This patch fixes it: <a href="https://bin.snyman.info/mmmm47cx">https://bin.snyman.info/mmmm47cx</a><br><br></div>/Tomas<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-07 7:24 GMT+02:00 Raoul Snyman <span dir="ltr"><<a href="mailto:raoul@snyman.info" target="_blank">raoul@snyman.info</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Phil,<br>
<br>
We have a problem with Python 3.6 (and apparently 3.5 as well, although I'm not seeing it right now):<br>
<br>
$ python3.6 openlp.py<br>
Traceback (most recent call last):<br>
  File "openlp.py", line 44, in <module><br>
    main()<br>
  File "openlp/core/__init__.py", line 440, in main<br>
    settings.upgrade_settings()<br>
  File "openlp/core/common/settings.p<wbr>y", line 495, in upgrade_settings<br>
    self.setValue(new_key, old_value)<br>
  File "openlp/core/common/settings.p<wbr>y", line 525, in setValue<br>
    value = json.dumps(value, cls=OpenLPJsonEncoder)<br>
  File "/usr/lib/python3.6/json/__ini<wbr>t__.py", line 238, in dumps<br>
    **kw).encode(obj)<br>
  File "openlp/core/common/json.py", line 74, in __init__<br>
    super().__init__(skipkeys, ensure_ascii, check_circular, allow_nan, sort_keys, indent, separators, default)<br>
TypeError: __init__() takes 1 positional argument but 9 were given<br>
<br>
<br>
They've removed the __init__() method from the C implementation of the json module. Everything is now set up in __new__.<br>
<br>
 - <a href="https://bugs.python.org/issue30243" rel="noreferrer" target="_blank">https://bugs.python.org/issue3<wbr>0243</a><br>
 - <a href="https://github.com/python/cpython/commit/39b73dd5131ce205dcee3b9e24ba0fc28934d79c" rel="noreferrer" target="_blank">https://github.com/python/cpyt<wbr>hon/commit/39b73dd5131ce205dce<wbr>e3b9e24ba0fc28934d79c</a><br>
<br>
It looks like you're not supposed to subclass JSONEncoder anymore, you're supposed to pass it a default instead:<br>
<br>
 - <a href="https://github.com/python/cpython/blob/3.6/Lib/json/__init__.py#L73" rel="noreferrer" target="_blank">https://github.com/python/cpyt<wbr>hon/blob/3.6/Lib/json/__init__<wbr>.py#L73</a><br>
<br>
<br>
Ugh, that's a pain.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Raoul Snyman<br>
<a href="tel:%2B1%20%28520%29%20490-9743" value="+15204909743" target="_blank">+1 (520) 490-9743</a><br>
<a href="mailto:raoul@snyman.info" target="_blank">raoul@snyman.info</a><br>
______________________________<wbr>_________________<br>
openlp-dev mailing list<br>
<a href="mailto:openlp-dev@openlp.io" target="_blank">openlp-dev@openlp.io</a><br>
<a href="https://lists.openlp.io/mailman/listinfo/openlp-dev" rel="noreferrer" target="_blank">https://lists.openlp.io/mailma<wbr>n/listinfo/openlp-dev</a><br>
</div></div></blockquote></div><br></div>