question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: __init__() got an unexpected keyword argument 'encoding'

See original GitHub issue

When running the https://ax.dev/tutorials/tune_cnn.html notebook file in Google Colab: https://colab.research.google.com/drive/1P6TvA9UZDtLf9dMFTcYWm_RUBW0wpsiV#scrollTo=DMsfBROgGSBK

render(plot_contour(model=model, param_x='lr', param_y='momentum', metric_name='accuracy'))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-849423054076> in <module>()
----> 1 render(plot_contour(model=model, param_x='lr', param_y='momentum', metric_name='accuracy'))

2 frames
/usr/local/lib/python3.6/dist-packages/simplejson/__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, encoding, default, use_decimal, namedtuple_as_object, tuple_as_array, bigint_as_string, sort_keys, item_sort_key, for_json, ignore_nan, int_as_string_bitcount, iterable_as_array, **kw)
    397         ignore_nan=ignore_nan,
    398         int_as_string_bitcount=int_as_string_bitcount,
--> 399         **kw).encode(obj)
    400 
    401 

TypeError: __init__() got an unexpected keyword argument 'encoding'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ldworkincommented, May 12, 2019

Hi @glenn-jocher – currently working on this! Fix should be in shortly.

0reactions
ldworkincommented, May 19, 2019

Hi @glenn-jocher! Ah yes, we just discovered this is a problem – see issue https://github.com/facebook/Ax/issues/94. We will have a fix for this next week, but in the meantime, you can workaround it by using vanilla Jupyter (not Jupyter Labs). The plots should all work without any issues there.

Will close the task now since the original issue is fixed in our current release, and you can follow https://github.com/facebook/Ax/issues/94 for updates on this other issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - TypeError: __init__() got an unexpected keyword ...
Try to install Anaconda Python distributive (available for Linux, Windows and MacOS. It works perfectly fine for me:
Read more >
TypeError: __init__() got an unexpected keyword ... - GitHub
How to reproduce the behaviour I can get the result if I'm using ... TypeError: init() got an unexpected keyword argument 'encoding' ...
Read more >
django在使用腾讯云时报错__init__() got an unexpected ...
1.原因在于Python3.9版本的json_init_.py中loads()方法中没有了encoding字段, 所以这个地方返回encoding时就会报错修改以下返回值删除掉encoding即可.
Read more >
python, How To Fix TypeError init got an unexpected keyword ...
demo@ubuntu:~/SelfStudy/StackOverFlow/ItWorkedForMyTutorsCodeButItIsntWorkingForMe$ cat test_ng.py #!
Read more >
Flask got an unexpected keyword argument path
If this argument is given, the callable will be invoked after the server has processed the event, and any values returned by the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found